From f0fa6a34a9b62fc19e015b28e6aee487452f8d50 Mon Sep 17 00:00:00 2001 From: Mat Manna Date: Tue, 14 Jul 2026 23:05:39 -0400 Subject: [PATCH] fix: new routes --- bun.ts | 10 ++++++++++ package.json | 3 +-- src/app.ts | 2 +- src/index.ts | 9 +-------- src/vercel.ts | 3 --- vercel.json | 11 ++++++----- 6 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 bun.ts delete mode 100644 src/vercel.ts diff --git a/bun.ts b/bun.ts new file mode 100644 index 0000000..27af898 --- /dev/null +++ b/bun.ts @@ -0,0 +1,10 @@ +import app from "./app"; + +const PORT = parseInt(process.env.PORT || "8080"); + +Bun.serve({ + port: PORT, + fetch: app.fetch, +}); + +console.log(`indigestion listening on http://localhost:${PORT}`); diff --git a/package.json b/package.json index e13decf..4673b98 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,7 @@ "type": "module", "private": true, "scripts": { - "start": "bun run src/index.ts", - "build": "bun build src/vercel.ts --outdir output --target=node", + "start": "bun run bun.ts", "test": "bun test", "test:pg": "TEST_DATABASE_URL=postgres://indigestion:indigestion@localhost:5433/indigestion_test bun test", "db:push": "drizzle-kit push", diff --git a/src/app.ts b/src/app.ts index 9740d2e..ee79572 100644 --- a/src/app.ts +++ b/src/app.ts @@ -154,7 +154,7 @@ app.use("/api/*", async (c, next) => { // === Slack Events === app.post("/events", async (c) => { const body = await c.req.text(); - const payload = JSON.parse(body); +\ const payload = JSON.parse(body); if (payload.type === "url_verification") { return c.text(payload.challenge, 200, { "Content-Type": "text/plain" }); diff --git a/src/index.ts b/src/index.ts index 27af898..d3c89ef 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,3 @@ import app from "./app"; -const PORT = parseInt(process.env.PORT || "8080"); - -Bun.serve({ - port: PORT, - fetch: app.fetch, -}); - -console.log(`indigestion listening on http://localhost:${PORT}`); +export default app; diff --git a/src/vercel.ts b/src/vercel.ts deleted file mode 100644 index d3c89ef..0000000 --- a/src/vercel.ts +++ /dev/null @@ -1,3 +0,0 @@ -import app from "./app"; - -export default app; diff --git a/vercel.json b/vercel.json index c854cc0..a5255bc 100644 --- a/vercel.json +++ b/vercel.json @@ -1,12 +1,13 @@ { "$schema": "https://openapi.vercel.sh/vercel.json", - "buildCommand": "bun run build", - "outputDirectory": "output", "framework": null, - "routes": [ + "builds": [ { - "src": "/(.*)", - "dest": "src/vercel.ts" + "src": "src/index.ts", + "use": "@vercel/node" } + ], + "routes": [ + { "src": "/(.*)", "dest": "src/index.ts" } ] } -- 2.51.2