Skip to content

Instantly share code, notes, and snippets.

@rich-97
Created August 20, 2017 23:13
Show Gist options
  • Save rich-97/5dd7dbededc1f92370c4d392f2947575 to your computer and use it in GitHub Desktop.
Save rich-97/5dd7dbededc1f92370c4d392f2947575 to your computer and use it in GitHub Desktop.
Data upload and print to the stdout with nodejs.
const http = require('http')
const server = http.createServer()
server.on('request', function (req, res) {
res.writeHead(200)
req.on('data', function (chunk) {
console.log(chunk.toString())
})
res.end()
})
server.listen(8000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment