DEV Community

Major Key Alert: Hide your API Keys

kcarrel on August 04, 2019

I love integrating public APIs (Application Programming Interface) into my side projects in order to add in more functionality. However, this raise...
Collapse
 
codestuff2 profile image
Adam Whitlock

Hiding sensitive info like api keys is definitely a good idea when you are pushing code up to github. I also use env variables.

I don't write ruby much, but I do write lots of PHP and Node.

For PHP you can implement this solution for doing .env files:
github.com/vlucas/phpdotenv

For Node I like to use dotenv:
github.com/motdotla/dotenv

Great article. Thanks for writing!

Collapse
 
clairemuller profile image
Claire Muller

What a clear explanation! Just what I needed :)