Created
March 18, 2018 12:10
-
-
Save raduGaspar/b2aa098c1d5f5ffd2297b30a424f2dfd to your computer and use it in GitHub Desktop.
Barebones NodeJS 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') | |
const port = process.env.PORT || 3001 | |
http.createServer((req, res) => { | |
res.write('Hello World!') | |
res.end() | |
}).listen(port, () => { | |
console.log(`server start at port ${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment