diff options
Diffstat (limited to 'index.js')
-rw-r--r-- | index.js | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1,5 +1,6 @@ const express = require('express'); const path = require('path'); +const exphbs = require('express-handlebars'); const logger = require('./middleware/logger.js'); const app = express(); @@ -7,6 +8,10 @@ const app = express(); // Init middleware // app.use(logger); +// Handlebars Middleware +app.engine('handlebars', exphbs({defaultLayout: 'main'})); +app.set('view engine', 'handlebars'); + // Body Parser Middleware app.use(express.json()); app.use(express.urlencoded({extended: false})); |