feat(*): 代码仓库初始化

This commit is contained in:
2025-11-07 18:39:29 +08:00
commit b1aeb6b39b
36 changed files with 1700 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
const http = require("http");
const fs = require("fs");
const common = require(__dirname + "/common");
const server = http.createServer();
server.on("request", (req, res) => {
fs.readFile("./index.html", { encoding: "utf8" }, (err, data) => {
if (err) {
res.writeHead(500);
res.end("Error Loading File");
} else {
res.writeHead(200, {
"content-type": "text/html",
});
res.end(data.replace("@@@", JSON.stringify(common.getAll())));
}
});
});
server.listen(3000, () => {
console.log("server is running at http://127.0.0.1:3000");
});