index.js
const fs = require("fs");
const Koa = require("koa");
const app = new Koa();
app.use(async (ctx) => {
const html = fs.readFileSync("./index.html", "binary");
ctx.body = html;
});
app.listen(3000);
index.js
const fs = require("fs");
const Koa = require("koa");
const app = new Koa();
app.use(async (ctx) => {
const html = fs.readFileSync("./index.html", "binary");
ctx.body = html;
});
app.listen(3000);