remove useless code
Some checks failed
Release A New Version / build (16.x) (push) Failing after 46s

This commit is contained in:
fyears 2024-05-27 00:36:52 +08:00
parent b6d46d8b91
commit d885a4c743

View File

@ -1,25 +0,0 @@
// Importing the http module
const http = require("http");
const requestHandler = (req, res) => {
const body = [];
req
.on("data", (chunk) => {
body.push(chunk);
})
.on("end", () => {
const parsed = JSON.parse(Buffer.concat(body).toString());
const prettyParsed = JSON.stringify(parsed, null, 2);
console.log(prettyParsed);
res.setHeader("Content-Type", "application/json");
res.end(prettyParsed);
});
};
const server = http.createServer(requestHandler);
const addr = "0.0.0.0";
const port = 3000;
server.listen(port, addr, undefined, () => {
console.log(`Server is Running on ${addr}:${port}`);
});