Last active
October 20, 2017 12:07
-
-
Save kutsaniuk/541bb037ccd2d61420297365dc2b7615 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
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
app.set('port', process.env.PORT || 3000) | |
app.use(express.static(__dirname)) | |
app.use(bodyParser.json()) | |
var http = require('http').Server(app) | |
// Route | |
app.get('/', (req, res) => { | |
res.sendFile(__dirname + '/index.html'); | |
}) | |
http.listen(app.get('port'), () => { | |
console.log('Conference App listening on ' + app.get('port')) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment