Pooya Parsa
Pooya Parsa
`defineRoute` looks very clean way to declare routes and register later, especially for composition in an H3-only project. My main concern would be that we will eventually put too much...
I have ended up adding a more generic plugin interface in #1098 Imaginary implementation example for `app.register(route)` using experimental `defineValidatedHandler` (#1097) ```js // Plugin const defineRoute = (routeObj) => definePlugin((app)...
- middleware can hook to request (`event`) - plugins can hook to h3 instance (`app`) - and they can add middleware too! In your example this works as intended: ```js...
Middleware is already a well-known term for request interception, we cannot just change it. Plugin is also already a well-known term for extending libraries (similar to vue, etc) I get...
I agree! (releasing beta.0 shortly) we can finish work on `defineRoute` together once you made PR for beta.1
Thanks for sharing the idea @OskarLebuda, I was actually thinking the same. @productdevbook I get that it makes the most sense for generated routes to be separated. Also, for performance...
`defineRoute` internally calls `this.on` which uses [rou3](https://github.com/h3js/rou3/tree/main). It makes a tree of all possible routes and matching methods for complicated part of merging. In your CLI framework, you can limit...
@productdevbook Can you make a PR to add a minimal version of `defineRoute` / `defineWebSocketRoute`? (it can be added to `src/utils/route.ts`
Thanks for the report. It is a known issue with the current v3. I suggest migrating to `useNitroApp().fetch` and normal `fetch`
@denisugo can you please share more context how you discover this? #586 looks a good fix however I want to know the root cause of it because tests and normal...