Created
January 26, 2020 20:42
-
-
Save LautaroJayat/199685d1b3327c1fd2c035da553b76bc to your computer and use it in GitHub Desktop.
index.js Our final Server
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'); | |
// 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