feat(lst): intial scafolding for the new system
This commit is contained in:
27
apps/server/src/app.ts
Normal file
27
apps/server/src/app.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Hono } from "hono";
|
||||
import { serveStatic } from "hono/bun";
|
||||
import { logger } from "hono/logger";
|
||||
import { ocmeService } from "./services/ocmeServer";
|
||||
//import { expensesRoute } from "./routes/expenses";
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
app.use("*", logger());
|
||||
|
||||
// as we dont want to change ocme again well use a proxy to this
|
||||
app.all("/ocme/*", async (c) => {
|
||||
return ocmeService(c);
|
||||
});
|
||||
|
||||
app.get("/test", (c) => {
|
||||
return c.json({ success: true, message: "hello from bun" });
|
||||
});
|
||||
|
||||
//const apiRoute = app.basePath("/api").route("/expenses", expensesRoute);
|
||||
|
||||
app.get("*", serveStatic({ root: "../frontend/dist" }));
|
||||
app.get("*", serveStatic({ path: "../frontend/dist/index.html" }));
|
||||
|
||||
export default app;
|
||||
|
||||
//export type ApiRoute = typeof apiRoute;
|
||||
Reference in New Issue
Block a user