Skip to content

Instantly share code, notes, and snippets.

@djirdehh
Last active July 31, 2017 01:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save djirdehh/2886daa3e48611e6300a5386ba029351 to your computer and use it in GitHub Desktop.
Save djirdehh/2886daa3e48611e6300a5386ba029351 to your computer and use it in GitHub Desktop.
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