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: https://www.youtube.com/playlist?list=PL0Zuz27SZ-6Oi6xNtL_fwCrwpuqylMsgT

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/docs/Web/JavaScript/Guide/Modules
Netlify Docs - Get Started with Build Configuration: https://docs.netlify.com/configure-builds/get-started/

More Beginner JS Videos:
freeCodeCamp: https://youtu.be/PkZNo7MFNFg
Traversy Media: https://youtu.be/hdI2bqOjy3c
The Net Ninja: https://youtu.be/iWOYAxlnaww

Follow Me:
Twitter: https://twitter.com/yesdavidgray
Reddit: https://www.reddit.com/user/DaveOnEleven
Medium: https://medium.com/@davegray_86804

#hiding #api #keys