Created
May 19, 2018 17:52
-
-
Save pizzapanther/1343dc725ecab39f2526a3c9ced7f514 to your computer and use it in GitHub Desktop.
Starter for Express
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
// npm install express nunjucks body-parser | |
const express = require('express'); | |
const nunjucks = require('nunjucks'); | |
const body_parser = require('body-parser'); | |
var app = express(); | |
nunjucks.configure('views', { | |
autoescape: true, | |
express: app, | |
noCache: true | |
}); | |
app.use(body_parser.urlencoded({extended: false})); | |
app.use(express.static('public')); | |
app.listen(8080, function () { | |
console.log('Listening on port 8080'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment