Skip to content

Instantly share code, notes, and snippets.

@LautaroJayat
Created January 26, 2020 20:42
Show Gist options
  • Save LautaroJayat/199685d1b3327c1fd2c035da553b76bc to your computer and use it in GitHub Desktop.
Save LautaroJayat/199685d1b3327c1fd2c035da553b76bc to your computer and use it in GitHub Desktop.
index.js Our final Server
const http = require('http');
// This is what we are importing as a function to http.createServer()
const app = require('./app');
const PORT = process.env.PORT || 3000;
var server = http.createServer(app).listen(PORT);
server.on('listening', () => {
console.log('Server listening on', PORT);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment