Skip to content

Instantly share code, notes, and snippets.

@wadewegner
Created July 18, 2017 16:47
Show Gist options
  • Save wadewegner/d3c5135544dc562f2c78dd2a83a039f3 to your computer and use it in GitHub Desktop.
Save wadewegner/d3c5135544dc562f2c78dd2a83a039f3 to your computer and use it in GitHub Desktop.
var express = require('express');
var app = express();
var bodyParser = require('body-parser');
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.set('view engine', 'ejs');
app.get('/', function (req, res) {
res.render('pages/index', {});
});
app.use(express.static('/scripts'));
var port = process.env.PORT || 8080;
app.listen(port, function () {
console.log(`Example app listening on port ${port}!`)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment