DEV Community

Discussion on: How to hide API KEY in GitHub repo

Collapse
 
ptprashanttripathi profile image
Pt. Prashant tripathi • Edited

Why people can't understand the fact everyone is not born experts, all of us had used different approaches at different points of our learning path, just for understanding the logical.

I don't remember who said this that

You have to walk before you can run.

So moral of the story to learn the basics before trying to do something more advanced.

Have a Good day☘️

Collapse
 
rohitgulam profile image
Rohit Gulam

This way worked for me. I tried using dotenv but a reference error is raised saying that the 'require' keyword is not defined. I did a little research and I found out that require keyword is not known by the browser and can't be used with vanilla JS