Created
September 9, 2019 02:49
-
-
Save artemis15/3e895edd20d0c0b5eb62e51c0940017d to your computer and use it in GitHub Desktop.
Simple Server js file with HBS template in Express framework
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 app = require('express')(); | |
const path = require('path'); | |
//setting our app engine to handlebars | |
app.set('views', path.join(__dirname,'views')) | |
app.set('view engine', 'hbs'); | |
app.get('/',(request,response)=>{ | |
response.render('index'); | |
}); | |
app.listen(3020,()=>console.log('node.js express server started at port 3020')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment