Last active
June 2, 2016 15:52
-
-
Save oldaccountarchived/9debca04a88dc8f3c0b5 to your computer and use it in GitHub Desktop.
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
'use strict'; | |
let express = require('express'); | |
let bodyParser = require('body-parser'); | |
let path = require('path'); | |
let app = express(); | |
let publicDir = '/public'; | |
let port = 8080; | |
app.use(bodyParser.json()); | |
app.use(express.static(publicDir)); | |
app.get('/', function(req, res) { | |
res.sendFile(path.join(__dirname, 'index.html')); | |
}); | |
app.listen(port); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment