We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b8c836 commit af110d2Copy full SHA for af110d2
javascript/bunicorn/app.ts
@@ -0,0 +1,17 @@
1
+import { RouteBuilder, BunicornApp } from "@bunicorn/server";
2
+
3
+const app = new BunicornApp({ basePath: "/" });
4
+const rb = new RouteBuilder();
5
+app.addRoutes([
6
+ rb.get("/", (ctx) => ctx.ok()),
7
+ rb.get("/user/:id", (ctx) => ctx.raw(ctx.params.id)),
8
+ rb.post("/user", (ctx) => ctx.ok()),
9
+]);
10
11
+// @ts-expect-error
12
+Bun.serve({
13
+ fetch(req: Request) {
14
+ return app.handleRequest(req);
15
+ },
16
+ port: 3000,
17
+});
javascript/bunicorn/config.yaml
@@ -0,0 +1,6 @@
+framework:
+ website: https://github.com/ragokan/bunicorn
+ version: 0.1
+ engines:
+ - bun
javascript/bunicorn/package.json
@@ -0,0 +1,5 @@
+{
+ "dependencies": {
+ "@bunicorn/server": "~0.0.1"
+ }
+}
0 commit comments