bewcloud/main.ts
Bruno Bernardino 986573cfc9
Upgrade Fresh to v2
Also upgrade all dependencies, make some unnecessary, and some other small tweaks.

Because this has a big potential of unexpectedly breaking things, I'm doing a "breaking release", v3.
2025-09-26 18:48:02 +01:00

15 lines
358 B
TypeScript

import { App, staticFiles } from 'fresh';
import { startCrons } from '/crons/index.ts';
const shouldStartCrons = Deno.env.get('START_BEWCLOUD_CRONS') === 'true';
if (shouldStartCrons) {
await startCrons();
}
export const app = new App()
// Add static file serving middleware
.use(staticFiles())
// Enable file-system based routing
.fsRoutes();