|
|
@ -4,6 +4,7 @@ var path = require('path'); |
|
|
|
var cookieParser = require('cookie-parser'); |
|
|
|
var logger = require('morgan'); |
|
|
|
const { engine } = require('express-handlebars'); |
|
|
|
const { basedir } = require('./config/constants'); |
|
|
|
|
|
|
|
var indexRouter = require('./routes/index'); |
|
|
|
const consoleSubscriber = require('./subscribers/consoleSubscriber'); |
|
|
@ -23,7 +24,7 @@ app.use(logger('dev')); |
|
|
|
app.use(express.json()); |
|
|
|
app.use(express.urlencoded({ extended: false })); |
|
|
|
app.use(cookieParser()); |
|
|
|
app.use(express.static(path.join(__dirname, 'public'))); |
|
|
|
app.use(express.static(path.join(basedir, 'public'))); |
|
|
|
|
|
|
|
app.use('/', indexRouter); |
|
|
|
|
|
|
|