Skip to content

Instantly share code, notes, and snippets.

@elpuas
Last active April 5, 2021 13:13
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 elpuas/b3c6d1dd298b071426f195387f028901 to your computer and use it in GitHub Desktop.
Save elpuas/b3c6d1dd298b071426f195387f028901 to your computer and use it in GitHub Desktop.
const http = require( 'http' )
// Create and start a server with the
// createServer method from http package
const server = http.createServer( ( req, res ) => {
console.log(req.url)
res.end( 'Hello node.js' )
} )
// start our server to start taking request
server.listen(3000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment