Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap
In this tutorial, you will learn how to hide your API keys without using dotenv environment variables. While there is nothing wrong with using dotenv if you are familiar with NPM, this solution is an alternative for those who are not. You should not store API keys in a public GitHub repository, and this tutorial will help you keep your API keys out of your repos.
▶ Just learning JavaScript? Check out my JavaScript Tutorials for Beginners Playlist found here: • Javascript Tutorials for Beginners
✅ Quick Concepts outline:
Hide API Keys without dotenv
• OpenWeatherMap API example
• Utilize .gitignore to avoid storing your API key on GitHub
• Use a JavaScript module import
• Practice the git bash commands before constructing the build command
• Enter the new build command for your project on Netlify
• Trigger a new deploy
• Verify your API key is imported and working
🤖 API used in the examples for this tutorial:
• https://openweathermap.org/api
📚 Further Reading:
MDN Web Docs - Modules:
https://developer.mozilla.org/en-US/d...
Netlify Docs - Get Started with Build Configuration: https://docs.netlify.com/configure-bu...
📺 More Beginner JS Videos:
freeCodeCamp: • Learn JavaScript - Full Course for Beginners
Traversy Media: • JavaScript Crash Course For Beginners
The Net Ninja: • Modern JavaScript Tutorial #1 - Intro & Setup
✅ Follow Me:
Twitter: / yesdavidgray
Reddit: / daveoneleven
Medium: / davegray_86804
#hiding #api #keys