bunrest icon indicating copy to clipboard operation
bunrest copied to clipboard

An express-like API for bun server

Results 8 bunrest issues
Sort by recently updated
recently updated
newest added

OS: WSL Ubuntu 22.04 Bun version: 1.0.36 Bunrest version: ^1.3.8 My code: ``` app.get("/api/v1/one/:name/:id", async (req, res) => { const name = req.params?.name; const id = req.params?.id; if (!id) {...

I have a path that can be accessed via `GET` or `POST`, for differing reasons. I have an auth middleware on the `GET` handler, however, the middleware is also being...

@lau1944 Database connected 11 | import server from "bunrest"; 12 | const app = server(); 14 | 15 | app.get('/', (req, res) => { 16 | console.log("app.requestIp(req)", server.requestIp(req));

Bun version: 1.0.22 Bunrest Version: 1.3.7 Reproduce: index.ts: ```typescript import server from "bunrest"; const app = server(); app.get("/", (req, res) => { res.send("Hello World!"); }); app.ws( (ws, msg) => {...

When using async middleware it starts the execution and jumps right back to the next one before it finishes. ``` import server from "bunrest"; const app = server(); const port...

websocket api fails, I think it might need this to work properly again https://github.com/lau1944/bunrest/blob/09e27426e081f61f8a9914518c80e9438875aba6/src/server/server.ts#L149 ` const success = server.upgrade(req1); if (success) { // Bun automatically returns a 101 Switching Protocols...

# Update 2 | Notes for Global Use Global use seems to be failing for handlers that have a middleware with the following type: `(req: BunRequest, res: BunResponse, next?: (err?:...

In this example the middleware is "wrongly" classed as a Handler and not a MiddlewareFunc ```typescript (method) BunServer.use(middleware: Handler): void app.use((req: BunRequest, res: BunResponse, next: ((err?: Error | undefined) =>...