grill-blog/main.ts
2024-05-13 23:50:54 +02:00

20 lines
365 B
TypeScript

import { Application, Router } from "https://deno.land/x/oak@v12.6.1/mod.ts";
const port = 8000;
const app = new Application();
const router = new Router();
app.use((ctx) => {
return ctx.send({
root: "public",
index: "index.html",
});
});
app.use(router.routes());
console.log(`Listening on port ${port}`);
await app.listen({ port });