Skip to content

Instantly share code, notes, and snippets.

@OsvaldoFrias
Created October 8, 2021 14:58
Show Gist options
  • Save OsvaldoFrias/1dd621c61b3148219a1873f7021c729a to your computer and use it in GitHub Desktop.
Save OsvaldoFrias/1dd621c61b3148219a1873f7021c729a to your computer and use it in GitHub Desktop.
const http = require("http");
const server = http.createServer((req, res) => {
let data = "";
req.on("data", (chunk) => {
data += chunk;
});
req.on("end", () => {
console.log(data);
res.end();
});
});
server.listen(8001);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment