diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-03-20 22:35:18 +0100 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-03-20 22:35:18 +0100 |
commit | 29f7292f84d456a49dd8e2dcd93ab2395470aef0 (patch) | |
tree | b78c0ca29a1c53d5c6e5c8d1a9d45e27b9c2a941 /src/server | |
parent | 28fc88aee2bb43735bb76b10f111b411ce66e1e4 (diff) |
Move from jade to handlebars
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/app.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/app.js b/src/server/app.js index 7b03128..7e8d9e9 100644 --- a/src/server/app.js +++ b/src/server/app.js @@ -23,6 +23,7 @@ const path = require('path'); const logger = require('morgan'); const bodyParser = require('body-parser'); const compression = require('compression'); +const handlebars = require('express-handlebars'); const index = require('./routes/index'); const getSchedule = require('./routes/getSchedule'); @@ -32,8 +33,11 @@ const app = express(); app.use(compression()); // view engine setup +app.engine('handlebars', handlebars({ + partialsDir: path.join(__dirname, '../client/views/partials'), +})); app.set('views', path.join(__dirname, '../client/views')); -app.set('view engine', 'jade'); +app.set('view engine', 'handlebars'); app.use(logger('dev')); app.use(bodyParser.urlencoded({ extended: false })); |