aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.js b/index.js
index c787388..0f5fbe6 100644
--- a/index.js
+++ b/index.js
@@ -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}));