Created
January 10, 2019 22:33
-
-
Save Avaray/871605a4acd9450316c1c62746b0a289 to your computer and use it in GitHub Desktop.
[NodeJS] Create HTTP server in simple way
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
require('http') | |
.createServer() | |
.listen({ | |
port: 4000 | |
}) | |
.on('request', (req, res) => { | |
res.end('Hello World!'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment