The BEST way to proxy your API in Nuxt

Описание к видео The BEST way to proxy your API in Nuxt

➡️ Proxying routes to your back-end or third party APIs is a common practice! Over the last two years, various strategies came up in Nuxt. But not all of them work equally will. To figure out which two strategies are the recommended ones, we have a look at the four most common strategies, their shortcomings and which ones I would recommend to use!

Key points:
✅ How a successful proxy strategy looks like
🔢 All common strategies - From Vite's proxy to a Nitro proxy endpoint
‼️ Which strategies to use and how to implement them

Links:
📺 Nuxt vs. Nitro:    • Nuxt vs. Nitro - What does what in yo...  
🔗 GH discussion around proxying: https://github.com/nuxt/nuxt/discussi...
📺 Common runtimeConfig mistakes:    • Nuxt's runtimeConfig - The most commo...  
🔗 H3 JSDoc: https://www.jsdocs.io/package/h3
🔗 Code: https://github.com/manniL/alexander-l...

Don't forget to hit that "Subscribe" button, ring the notification bell and give a thumbs up!

🌐 Connect further:
Website: https://www.lichter.io
Twitter/X:   / thealexlichter  
Twitch:   / thealexlichter  

Chapters:
00:00 Intro
00:54 Discussion around proxying
01:30 Setup & demo app
02:57 Goals for our proxy solution
04:14 Strategy 1 - Vite's proxy
07:30 Strategy 2 - Nitro's devProxy
10:16 Strategy 3 - Proxy routeRule
13:30 Strategy 4 - Nitro proxy API endpoint
19:28 Summary and what to use

Комментарии

Информация по комментариям в разработке