Skip to content

Instantly share code, notes, and snippets.

@artemis15
Created September 9, 2019 02:49
Show Gist options
  • Save artemis15/3e895edd20d0c0b5eb62e51c0940017d to your computer and use it in GitHub Desktop.
Save artemis15/3e895edd20d0c0b5eb62e51c0940017d to your computer and use it in GitHub Desktop.
Simple Server js file with HBS template in Express framework
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