Skip to content

Instantly share code, notes, and snippets.

@elpuas
Last active Apr 5, 2021
Embed
What would you like to do?
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