add handlebars for blueprints

This commit is contained in:
Lachlan Kermode
2020-06-02 14:58:22 +02:00
parent aa30489be9
commit 63c26bdb12
7 changed files with 143 additions and 8 deletions

View File

@@ -5,11 +5,17 @@ import middleware from './middleware'
import api from './api'
// import config from './sheets_config'
import dotenv from 'dotenv'
const hbs = require('express-handlebars')
dotenv.config()
let app = express()
app.server = http.createServer(app)
app.engine('.hbs', hbs({
extname: '.hbs',
defaultLayout: 'default'
}))
app.set('view engine', '.hbs')
// enable cross origin requests explicitly in development
if (process.env.NODE_ENV === 'development') {