Skip to content

Instantly share code, notes, and snippets.

@WimJongeneel
Created January 12, 2020 13:02
Show Gist options
  • Save WimJongeneel/4915fb7329f585bd2ab9e7c011314b54 to your computer and use it in GitHub Desktop.
Save WimJongeneel/4915fb7329f585bd2ab9e7c011314b54 to your computer and use it in GitHub Desktop.
net.createServer()
.listen(PORT, IP, BACKLOG)
.on('connection', socket => socket
.on('data', buffer => {
const request = buffer.toString()
socket.write('hello world')
socket.end()
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment