X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=app.js;h=914e29b153e990ea2c8c1919061b240628e89632;hb=298c42e63ae321526693e9ce418c4113af36e025;hp=b44be79104e214aa45a2df1273cebfb1189ad331;hpb=fb1ecbdf0326d659c7afab9c55f8c1031f85b1b9;p=vchess.git diff --git a/app.js b/app.js index b44be791..914e29b1 100644 --- a/app.js +++ b/app.js @@ -6,8 +6,6 @@ var logger = require('morgan'); var sassMiddleware = require('node-sass-middleware'); var favicon = require('serve-favicon'); -var router = require('./routes/all'); - var app = express(); app.use(favicon(path.join(__dirname, "public", "images", "favicon", "favicon.ico"))); @@ -45,7 +43,8 @@ app.use(sassMiddleware({ })); app.use(express.static(path.join(__dirname, 'public'))); -app.use('/', router); +const routes = require(path.join(__dirname, "routes", "all")); +app.use('/', routes); // catch 404 and forward to error handler app.use(function(req, res, next) {