AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Discord nitro code generator github1/22/2024 ![]() ![]() Nitro produces a standalone server dist that is independent of node_modules. You can access these types when using $fetch() or useFetch(). When using API routes (or middleware), Nitro will generate typings for these routes as long as you are returning a value instead of using res.end() to send a response. ![]() Request body and params are automatically handled, with correct Content-Type headersįor more information on $fetch features, check out ofetch.Automatic parsing of JSON responses (with access to raw response if needed).$fetch API is using ofetch, with key features including: ![]() This will make an API call to the server if run on the browser, but will directly call the relevant function if run on the server, saving an additional API call. Nitro allows 'direct' calling of routes via the globally-available $fetch helper. Learn more about the API layer in the server/ directory. ![]()
0 Comments
Read More
Leave a Reply. |