f0ckv2/src/inc/routes/index.mjs

11 lines
249 B
JavaScript
Raw Normal View History

2019-04-25 18:00:47 +00:00
import router from "../router";
2019-04-25 19:25:38 +00:00
import fs from "fs";
2019-04-25 18:00:47 +00:00
2019-05-15 17:51:11 +00:00
const tpl = fs.readFileSync("./views/index.html", "utf-8");
2019-04-25 19:25:38 +00:00
2019-05-07 20:23:43 +00:00
router.get(/^\/(page\/[0-9]+)?$/, async (req, res) => {
2019-05-15 17:51:11 +00:00
res
.writeHead(200, { 'Content-Type': 'text/html' })
.end(tpl);
2019-04-25 18:00:47 +00:00
});