mirror of
https://github.com/khairul169/garage-webui.git
synced 2025-04-28 14:59:31 +07:00
24 lines
453 B
TypeScript
24 lines
453 B
TypeScript
import { Hono } from "hono";
|
|
import { logger } from "hono/logger";
|
|
import router from "./routes";
|
|
import { proxyApi } from "./lib/proxy-api";
|
|
|
|
const HOST = import.meta.env.HOST || "0.0.0.0";
|
|
const PORT = Number(import.meta.env.PORT) || 3909;
|
|
|
|
const app = new Hono();
|
|
|
|
app.use(logger());
|
|
|
|
// API router
|
|
app.route("/", router);
|
|
|
|
// Proxy to garage admin API
|
|
app.all("*", proxyApi);
|
|
|
|
export default {
|
|
fetch: app.fetch,
|
|
hostname: HOST,
|
|
port: PORT,
|
|
};
|