Тёмный

Environment settings with Nuxt.js 

The Pragmatic Programmer
Подписаться 1,8 тыс.
Просмотров 3 тыс.
50% 1

Опубликовано:

 

29 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@captainalpha4853
@captainalpha4853 2 года назад
Thanks for the clear explanation! Hope you do more of videos like this and advanced topics in Vue & Nuxt.js. Cheers!
@thepragmaticprogrammer
@thepragmaticprogrammer 2 года назад
Thanks, will do!
@MrBuddy-dz3kz
@MrBuddy-dz3kz 2 года назад
I'm new to nuxt js just learning now but when adding a rest api it's showing me an CORS error through api , I try many different solution but i don't know how solve this. can you please explain me how to add restapi with credential required and get data in server side not client side . because when using node js it's fine API showing fetch data correctly in terminal
@thepragmaticprogrammer
@thepragmaticprogrammer 2 года назад
Can I direct you to the Nuxt discord community (discord.com/invite/ps2h6QT) where you can have a better dialogue about this with the Nuxt community - myself included.
@thepragmaticprogrammer
@thepragmaticprogrammer 2 года назад
Do you have an alternative solution?
@JanikSpies-g5z
@JanikSpies-g5z Год назад
love the voice
@dimitrynevermind7804
@dimitrynevermind7804 Год назад
Thank you for this video, I wanted to use it for friebase app api keys, but I can't access $config from .js file( So need to find another way.
@thepragmaticprogrammer
@thepragmaticprogrammer Год назад
Thanks for watching - client side you can get the Nuxt context from the 'window' object e.g. window.$nuxt.$config.apiKey. You might be able to use events server side e.g. OnMounted nuxtjs.org/docs/concepts/server-side-rendering/#server-vs-browser-environments
@dimitrynevermind7804
@dimitrynevermind7804 Год назад
@@thepragmaticprogrammer thank you, that's very useful info! Actually, according to example you provided in the beginning of video with different API keys - the point is to hide that API from potential malefactors. But then you show how to display some telephone on frontend. I would not to recommend that for dev API keys. For that purpose I used .env file with .gitignore, imo this solution suits better described case.
Далее
Create a JAMStack website Contact Page
32:19
Environment Settings with Nuxt 3
8:43
Просмотров 2,9 тыс.
Nuxt 3 - environment variables
8:36
Просмотров 5 тыс.
Deploy Nuxt3 via GitHub Actions
25:27
Просмотров 4,4 тыс.
😲 An environment-aware Nuxt Configuration
10:09
Просмотров 7 тыс.
Nuxt 3 full course build and deploy | #Nuxtjs #vue #nuxt3
2:49:16
Nuxt 3 Server Routes Master Course
13:22
Просмотров 18 тыс.
My 5 Favorite Nuxt Features
3:43
Просмотров 28 тыс.
Is Nuxt 3's runtimeConfig UNSAFE?!
11:49
Просмотров 8 тыс.
The BEST way to proxy your API in Nuxt
21:12
Просмотров 19 тыс.
Lazy loading your auto imported components in Nuxt
6:03