Eunsu486

Modify app.js

Showing 1 changed file with 6 additions and 0 deletions
......@@ -6,8 +6,11 @@ var logger = require('morgan');
var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');
var categoryRouter = require('./routes/category');
var vendorRounter = require('./routes/vendors');
var app = express();
var bodyParser = require('body-parser');
// view engine setup
app.set('views', path.join(__dirname, 'views'));
......@@ -26,6 +29,9 @@ app.use('/users', usersRouter);
app.use(function (req, res, next) {
next(createError(404));
});
app.use('/category', categoryRouter);
app.use('/vendors/bootstrap', express.static(path.join(__dirname, "./node_modules/bootstrap/dist")));
app.use(bodyParser.urlencoded({ extended: false }));
// error handler
app.use(function (err, req, res, next) {
......