- Learning Node.js via Freecodecamp. Realized that I need to learn about it 'cause the tutorials I was finding online introduced new concepts that I didn't understand. Trying to create a back-end to store/serve my API keys and endpoints.
- Learned this about versioning syntax:
~to allow for patch updates.
^to allow minor updates.
- Using Glitch for the first time to go through the tutorials.
- Trying to figure out how to hide API keys on react projects.
- Read through more docs and help guides. There's conflicting guides on where to store your API keys. Some people suggest the simple solution of
.env, others say that it's a bad practice because it should be for environment variables and not secrets. Which leads me down the back-end server path.
- I don't know how to use the Netlify environment variables. I think I have to write a script for the build to make it available to the app. But I don't know where the script should live, or what's required to write the script. This shows that I'm not 100% sure what Netlify is doing to deploy the site.
- How would I create a production build locally?
- How do I modify the build script so that the environment variables are available?
- Would it be easier to just create a node server as a reverse proxy to the API? Could I use it to only serve the key, or does it have to become the API and the database? Creating a Node server to work with create-react-app
- On not using
.envto store your API secrets and here
- Solution that works locally, but there might be a missing piece to have it work with online build and deploy systems like Netlify