世界上最伟大的投资就是投资自己的教育
-
var fs = require("fs");
function route(handle, pathname, response, params) {
console.log("Routing a request for " + pathname);
if (typeof handle[pathname] === "function") {
handlepathname;
} else {
response.writeHead(200, { "Content-Type": "text/html" });
fs.createReadStream(__dirname + "/404.html", "utf8").pipe(response);
}
}module.exports.route = route;
-
在 index.html 页面引入
© 汕尾市求知科技有限公司 | Rails365 Gitlab | Qiuzhi99 Gitlab | 知乎 | b 站 | 搜索
粤公网安备 44152102000088号 | 粤ICP备19038915号
Top