import { Elysia } from "elysia"; import pug from "pug"; import { join } from "path"; // Phase 0 skeleton: one server-rendered page. The real map viewer (Leaflet 2D + Babylon 3D // canvases, server selector, chat box, marker tool) lands starting Phase 1 — this just proves // the Pug+Tailwind+Alpine rendering pipeline end to end. const renderIndex = pug.compileFile(join(import.meta.dir, "views/index.pug")); const app = new Elysia() .get("/", () => new Response(renderIndex({}), { headers: { "Content-Type": "text/html" } })) .get("/health", () => ({ status: "ok" })) .get("/css/tailwind.css", () => Bun.file(join(import.meta.dir, "public/css/tailwind.css"))) .listen(Number(process.env.PORT ?? 3001)); console.log(`[frontend] listening on :${app.server?.port}`);