Files
ScoreSpot/src/config/handlebars.js

9 lines
519 B
JavaScript

// create `ExpressHandlebars` instance and configure the layouts and partials dir.
const expressHandlebars = require("express-handlebars"); // express-handlebars is a Handlebars view engine for Express. Handlebars.js is a popular templating engine that is powerful, flexible, and helps to create reusable HTML templates.
const hbs = expressHandlebars.create({
extname: "hbs",
layoutsDir: __dirname + "./../../public/views/layouts",
partialsDir: __dirname + "./../../public/views/partials",
});
module.exports = hbs;