Last active
December 6, 2019 15:30
-
-
Save rocktimsaikia/93c4fe19ee4d9641ccab8fd7caee4c50 to your computer and use it in GitHub Desktop.
Use .hbs as file extension for express handlebars.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const exphbs = require('express-handlebars'); | |
app.engine('.hbs', exphbs({extname: '.hbs'})); | |
app.set('view engine', '.hbs'); | |
// Now you can use `.hbs` as file extension for express-handlebars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment