Thank you Perry. I created the .env file and moved the api there.
It deployed, but doesn’t work. Its failing where the code grabs the API data.
console.log in the app.js the
process.env to console out the name of the variable in
.env, its returns as
undefined in console.
I created the app with
create-react-app, and have the variable name in
.env appended with
EDIT: I see where I went wrong, I’m struggling a bit to add the correct information to then rebuild.
I didn’t add environment variables to the
Environment section for netlify build.
Where it says to
Set environment variables for your build script and add-ons
Then to add the key and value, the key I would think would be the variable name, but I’m not following what the value should be…certainly its not the api key itself that I’m keeping hidden.
Going through the docs to try to grasp the steps needed. Any guidance would be appreciated.
Thank you for your time,