Created
April 6, 2017 16:59
-
-
Save azat-co/5c035301e13037e52cd689205b08c121 to your computer and use it in GitHub Desktop.
Hello World Node HTTP server for AWS User Data
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 port = 3000 | |
require('http') | |
.createServer((req, res) => { | |
console.log('url:', req.url) | |
res.end('hello world') | |
}) | |
.listen(port, (error)=>{ | |
console.log(`server is running on ${port}`) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment