.env Vs. api.json
Prior to this lesson I've been storing API keys in a hidden .env file and using process.env.API_KEY to access it.
Is there a benefit to using api.json over .env? Is one approach more secure than the other?
Heidi FryzellFront End Web Development Treehouse Moderator 20,612 Points
Thanks for reaching out. I honestly don't know the answer to your question, it goes it little beyond my present experience level. I did do a Google search to try and understand what you were asking and this article might be helpful:
It talks about why you should use environment variables with a .env file over a config.json file.
I hope this helps in some way and happy coding! Heidi