Created
July 18, 2017 16:47
-
-
Save wadewegner/d3c5135544dc562f2c78dd2a83a039f3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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