Skip to content

Instantly share code, notes, and snippets.

@conanak99
Last active February 15, 2019 03:25
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 conanak99/0de790ad5363ea5c9b178325d2f90b81 to your computer and use it in GitHub Desktop.
Save conanak99/0de790ad5363ea5c9b178325d2f90b81 to your computer and use it in GitHub Desktop.
const http = require('http')
const port = 3000
const server = http.createServer((request, response) => {
console.log(request.url)
response.end('Hello from ToiDiCodeDao')
})
server.listen(port, (err) => {
if (err) {
return console.log('something bad happened', err)
}
console.log(`Server is listening on ${port}`)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment