API keys and environment variables on netlifyOctober 2, 2019 at 2:14pm
I am still a bit confused with all this…a caveat though, I am new to Netlify and to coding… so bear with me.
I have set my
.env.developmentfile in my gatsbyJS site so that I can store my API_KEY and APP_ID in order to not expose them when I commit to git. That was perfectly and I am able to ping and use my API endpoint, however I want it to work when my site is live and for same reason, I am not able to do that.
I have also set my environment variables in Netlify UI so that I can have access them at build time (I guess?), on my files I am still using
process.env.API_KEYin order to used them, but for same reason I am not able to get to them. How can I inject the variables from NETLIFY UI into my client-side code?
For same reason I am not able to achieve this.
Any guidance would be very much appreciated.
October 5, 2019 at 5:58am