import { Application, Router } from "jsr:@oak/oak"; const app = new Application(); const router = new Router(); app.use(router.routes()); app.use(router.allowedMethods()); app.use(async (ctx, next) => { try { await ctx.send({ root: "./public", index: "index.html" }); } catch { next(); } }); const port = 8000; const listener = app.listen({ port }); console.log(`Listening at http://localhost:${port}/`); await listener;