Skip to content

Instantly share code, notes, and snippets.

@pizzapanther
Created May 19, 2018 17:52
Show Gist options
  • Save pizzapanther/1343dc725ecab39f2526a3c9ced7f514 to your computer and use it in GitHub Desktop.
Save pizzapanther/1343dc725ecab39f2526a3c9ced7f514 to your computer and use it in GitHub Desktop.
Starter for Express
// 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