Skip to content

Commit 81f80d3

Browse files
committed
feat: Add srvx dependency and update main.ts to use srvx for serving
1 parent 0938870 commit 81f80d3

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

bun.lock

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"fetch-event-stream": "^0.1.5",
1717
"hono": "^4.6.17",
1818
"ofetch": "^1.4.1",
19-
"pathe": "^2.0.2"
19+
"pathe": "^2.0.2",
20+
"srvx": "^0.1.4"
2021
},
2122
"devDependencies": {
2223
"@echristian/eslint-config": "^0.0.16",

src/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Serve } from "bun"
1+
import { serve, type ServerHandler } from "srvx"
22

33
import { parseCli } from "./lib/cli"
44
import { initializeApp } from "./lib/initialization"
@@ -8,7 +8,7 @@ const options = await parseCli()
88

99
const { port } = await initializeApp(options)
1010

11-
export default {
12-
fetch: server.fetch,
11+
serve({
12+
fetch: server.fetch as ServerHandler,
1313
port,
14-
} satisfies Serve
14+
})

0 commit comments

Comments
 (0)