Last active
July 31, 2017 01:38
-
-
Save djirdehh/2886daa3e48611e6300a5386ba029351 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
const http = require("http"); | |
const express = require('express'); | |
const app = express(); | |
app.use('/public', express.static('./public')); | |
app.get('/', (req, res) => { | |
res.sendFile(__dirname + '/index.html'); | |
}) | |
const server = http.createServer(app); | |
server.listen(3000, () => { | |
console.log('listening on Port 3000!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment