lets fuckin go

This commit is contained in:
2025-08-07 22:44:19 -04:00
parent a90a914d2f
commit 9d4b17b762
18 changed files with 271 additions and 49 deletions

View File

@@ -0,0 +1,6 @@
import { Hono } from "hono";
const api = new Hono().get("/ping", (c) => c.text("pong"));
export default api;
export type ApiType = typeof api;

View File

@@ -1,7 +1,15 @@
import { Hono } from "hono";
import { serveStatic } from "hono/bun";
import api from "./api";
import { cors } from "hono/cors";
const app = new Hono();
app.use("*", async (c, next) => {
console.log(c.req.method, c.req.url);
await next();
console.log(">>", c.res.status);
});
const isDev = Bun.env.NODE_ENV === "development";
const isProd = Bun.env.NODE_ENV === "production";
@@ -13,4 +21,7 @@ isProd &&
})
);
app.use("*", cors());
app.route("/api", api);
export default app;