From d885a4c7433eab69d40cfba02546a380fd537043 Mon Sep 17 00:00:00 2001 From: fyears <1142836+fyears@users.noreply.github.com> Date: Mon, 27 May 2024 00:36:52 +0800 Subject: [PATCH] remove useless code --- debugServer.js | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 debugServer.js diff --git a/debugServer.js b/debugServer.js deleted file mode 100644 index 65a9026..0000000 --- a/debugServer.js +++ /dev/null @@ -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}`); -});