Skip to content

Commit

Permalink
Update bunicorn (#7753)
Browse files Browse the repository at this point in the history
  • Loading branch information
ragokan authored Sep 13, 2024
1 parent 7a8b63a commit 98038df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions javascript/bunicorn/app.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { RouteBuilder, BunicornApp } from "@bunicorn/server";

const app = new BunicornApp({ basePath: "/" });
const app = new BunicornApp();
const rb = new RouteBuilder();
app.addRoutes([
rb.get("/", (ctx) => ctx.ok()),
rb.get("/user/:id", (ctx) => ctx.raw(ctx.params.id)),
rb.post("/user", (ctx) => ctx.ok()),
]);

Bun.serve({
fetch: app.handleRequest,
reusePort: true,
port: 3000
app.serve({
port: 3000,
reusePort: true
})
2 changes: 1 addition & 1 deletion javascript/bunicorn/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"@bunicorn/server": "~0.0.7"
"@bunicorn/server": "~0.0.24"
}
}

0 comments on commit 98038df

Please sign in to comment.