initial commit
This commit is contained in:
18
apps/backend/src/index.ts
Normal file
18
apps/backend/src/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Hono } from "hono";
|
||||
import { serveStatic } from "hono/bun";
|
||||
import { startQuoteJob } from "./modules/quotes/quote.job";
|
||||
import quotesRouter from "./modules/quotes/quotes.routes";
|
||||
import { logger } from "./lib/logger";
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
app.route("/api/quotes", quotesRouter);
|
||||
|
||||
app.use("/assets/*", serveStatic({ root: "./web" }));
|
||||
app.get("*", serveStatic({ path: "./web/index.html" }));
|
||||
|
||||
startQuoteJob();
|
||||
|
||||
logger.info("Backend started");
|
||||
|
||||
export default app;
|
||||
Reference in New Issue
Block a user