grill-blog/main.ts

20 lines
365 B
TypeScript
Raw Permalink Normal View History

2024-05-13 22:50:54 +01:00
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 });