Can you please explain a little bit what is env-cmd and how you used it to deploy your env variables? I am very confused. i tried searching about it but didn't find anything meaningful. Also any other way to add environment variables to deployed site on firebase?
@CodeLikePro222 жыл бұрын
it is just a package that injects your environment variables into your built version of your script, so when you push that built version into your firebase the keys are included. And unfortunately I don't know other ways.
@pranavmendiratta31662 жыл бұрын
@@CodeLikePro22 Ok, got it! Thanks 👍
@rogerprz Жыл бұрын
Thank you really helped out.
@CodeLikePro22 Жыл бұрын
I am glad to hear that❤
@elmehdilahmidi69952 жыл бұрын
Hello @Code Like Pro, Sorry, but I don't see the point of having environment variables if they will show up in the final build, anyone could just look up "apiKey" in the minified js and be able to see your keys!
@CodeLikePro222 жыл бұрын
I totally agree, but at least to hide them from normal users. To make firebase data secure, we need to focus on firebase rules. Project settings you can see them in the console logs or network traffic easily even if you hide them very well google will show them anyway
@someone94932 жыл бұрын
Thank you!
@CodeLikePro222 жыл бұрын
You are very welcome my friend
@drbv272 жыл бұрын
Hi, you need any library or package for use the ENV file?. talking for development initially..... how can i configure the deploy for update by github?
@CodeLikePro222 жыл бұрын
unfortunately Firebase doesn't have environment variables at least that I know. If you are going to use github for deployment you need to include your variables in your code
@tahaaslam95072 жыл бұрын
bro please make a video on ""connect a beautiful contact form with firebase 9''''.
@CodeLikePro222 жыл бұрын
We will do it soon in another coming projects
@AGriffith2 жыл бұрын
Hey one question, is it possible to make a deplay each time there is a push on my main branch even though I did the video process on my developer branch?
@CodeLikePro222 жыл бұрын
They have in their docs integration with github: firebase.google.com/docs/hosting/github-integration
@AGriffith2 жыл бұрын
I tried to do it, but I'm having problems with the command that you use of npm run build:deploy because there is no env.local file on the github repository, do you have discord?
@CodeLikePro222 жыл бұрын
@@AGriffith yes this way can't work with github. In github option, Firebase till now doesn't have a way to hide the keys as environment variables. So you have to put them in the config file directly
@CodeLikePro222 жыл бұрын
@@AGriffith for security, focus on the firebase rules to make your web app secure. I have a video on this channel how to make these rules
@timobrien41902 жыл бұрын
If you have issues using windows and have an error with firebase login use Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser Also if anyone is having an issue with firebase init not allowing you to load your projects try using firebase login --reauth . Thanks! And good luck all
@timobrien41902 жыл бұрын
Also make sure not to put your .env file in your src folder LOL
@CodeLikePro222 жыл бұрын
@@timobrien4190 Thanks a lot for sharing this important information
@AGriffith2 жыл бұрын
you are speaking too low, can barely hear you with max volume
@CodeLikePro222 жыл бұрын
thanks for this notice. we will try to fix it in the upcoming videos