Learning Node.js

2020.06.29: Foundation

  • 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: major.minor.patch
  • ~ to allow for patch updates.
  • ^ to allow minor updates.
  • Using Glitch for the first time to go through the tutorials.
Returning a json request to app-url/json

  • 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 .env to store your API secrets and here
  • dotenv
  • Solution that works locally, but there might be a missing piece to have it work with online build and deploy systems like Netlify
How to Hide Your API Keys
Yes, I uploaded my API key to my GitHub — a beginner’s mistake. Unfortunately, I am not alone in obliviousness, as a fellow Flatiron School alumna was billed $7,000 last year when someone stole the…
Build environment variables
Netlify builds, deploys, and hosts your front end. Learn how to get started, see examples, and view documentation for the modern web platform.
Using a Reverse Proxy to Protect Third Party APIs
Don’t access Third Party APIs directly from a mobile app. Learn how to do it securely with a Reverse Proxy between the mobile app and the Third Party APIs.
Configuration and Config Vars | Heroku Dev Center
How to store configuration of a Heroku app in the environment, keeping config out of code, making it easy to maintain app or deployment specific configs.
Can I use Build Environment Variables in Netlify with Create-React-App?
How do I use Build Environment Variables in Netlify with Create-React-App?
How to create a React frontend and a Node/Express backend and connect them
by João Henrique How to create a React frontend and a Node/Express backend and connect them“two square blue LED lights” by israel palacio[https://unsplash.com/@othentikisra?utm_source=medium&utm_medium=referral] on Unsplash [https://unsplash.com?utm_source=medium&utm_medium=referral…
Fullstack React: How to get
Create React App · Set up a modern web app by running one command.
> Note: this feature is available with `react-scripts@0.2.3` and higher.