-
-
Notifications
You must be signed in to change notification settings - Fork 1k
docs: add server routes documentation #4174
Conversation
β Deploy Preview for nuxt3-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
```ts [server/api/node.ts] | ||
import type { IncomingMessage, ServerResponse } from 'http' | ||
|
||
export default async (req: IncomingMessage, res: ServerResponse) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not advocate this or if doing, mentioning is mainly for supporting legacy middleware and advanced use. h3 is dropping node dependency progressively (unjs/h3#73)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taking that into consideration, do you think the best forward thinking resolve would just be to avoid mentioning it altogether?
Co-authored-by: pooya parsa <[email protected]>
Should we migrate from using h3's defineHandler? |
Definitely! (marking it as deprecated soon) |
It would be really helpful from a formative standpoint to understand the whys behind moving from defineHandler to the new h3 method :) |
Co-authored-by: SΓ©bastien Chopin <[email protected]>
API Routes
documentation
Thanks for help @Diizzayy ππΌ |
π Description
This PR updates the documentation to detail possible usage and use cases of API Routes
π Checklist