Skip to content

Instantly share code, notes, and snippets.

@Avaray
Created January 10, 2019 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Avaray/871605a4acd9450316c1c62746b0a289 to your computer and use it in GitHub Desktop.
Save Avaray/871605a4acd9450316c1c62746b0a289 to your computer and use it in GitHub Desktop.
[NodeJS] Create HTTP server in simple way
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