'use strict';
const handlebars = require('express-handlebars');
const path = require('path');
module.exports.setup = (app) => {
const baseViewDir = path.resolve(__dirname, '../views');
app.set('views', baseViewDir);
app.engine('.stache', handlebars({
defaultLayout: 'blog',
extname: '.stache',
layoutsDir: `${baseViewDir}/layouts/`,
partialsDir: `${baseViewDir}/partials/`,
}));
// use .stache files as a default view extension
app.set('view engine', '.stache');
};