mirror of
https://github.com/khairul169/cebol.git
synced 2025-04-28 08:39:33 +07:00
21 lines
344 B
TypeScript
21 lines
344 B
TypeScript
import { Hono } from "hono";
|
|
import { serveStatic } from "hono/bun";
|
|
import router from "./routers/index";
|
|
import { initDb } from "./lib/database";
|
|
|
|
initDb();
|
|
|
|
const app = new Hono();
|
|
|
|
if (process.env.SERVE_STATIC) {
|
|
app.use(
|
|
serveStatic({
|
|
root: process.env.SERVE_STATIC,
|
|
})
|
|
);
|
|
}
|
|
|
|
app.route("/", router);
|
|
|
|
export default app;
|