import { DateTime } from "ts-luxon"; import type { Call, Result, Route } from "../types"; import { html, render } from "../util"; import { loginRoute } from "./login"; const routes: Record = { hello: { path: "/hello", methods: ["GET"], handler: async (_call: Call): Promise => { const now = DateTime.now(); const c = await render("basic/hello", { now }); return html(c); }, }, home: { path:'/', methods:['GET'], handler:async(_call:Call): Promise => { const c = await render('basic/home') return html(c) } }, login: loginRoute, }; export { routes };