Showing
1 changed file
with
2 additions
and
2 deletions
1 | var express = require('express'); | 1 | var express = require('express'); |
2 | var app = express(); | 2 | var app = express(); |
3 | -var router = require('./router/main')(app); | 3 | +var router = require('./router/main'); |
4 | var bodyParser = require('body-parser'); | 4 | var bodyParser = require('body-parser'); |
5 | 5 | ||
6 | app.set('views', __dirname + '/views'); | 6 | app.set('views', __dirname + '/views'); |
7 | app.set('view engine', 'ejs'); | 7 | app.set('view engine', 'ejs'); |
8 | app.engine('html', require('ejs').renderFile); | 8 | app.engine('html', require('ejs').renderFile); |
9 | - | 9 | +app.use('/',router); |
10 | var server = app.listen(3000, function(){ | 10 | var server = app.listen(3000, function(){ |
11 | console.log('good'); | 11 | console.log('good'); |
12 | }); | 12 | }); | ... | ... |
-
Please register or login to post a comment