1import { App, staticFiles } from "fresh";2import { type State } from "./utils.ts";3import { startDaily } from "./lib/daily.ts";45export const app = new App<State>();67app.use(staticFiles());8app.fsRoutes();910// The daily loop runs in-process on the hosted box (MOSAIC_DAILY=1):11// resume today's field from its log, then tick every minute.12startDaily().catch((e) =>13 console.error(JSON.stringify({ daily: "failed to start", error: String(e) }))14);