working node server

This commit is contained in:
metacryst
2025-12-20 14:39:14 -06:00
parent ee841efabd
commit c6fc9c90c6
8 changed files with 22 additions and 1071 deletions

12
http.js Normal file
View File

@@ -0,0 +1,12 @@
const http = require("http");
http.createServer((req, res) => {
const host = req.headers.host || "";
console.log("working")
res.writeHead(301, {
"Location": `https://${host}${req.url}`
});
res.end();
}).listen(2000, () => {
console.log("🔁 Redirect server running on port 2000");
});