DEV Community

loading...

Discussion on: How to Use Environment Variables in Vue.js

Collapse
ratracegrad profile image
Jennifer Bland Author

Not really. You want to store items that you don't want people to have access to. The port your server is running on is not necessarily a secret. If you are say using firebase for authentication then you would not want your firebase API keys available to everyone. In that case you would put that information in your .env file.

Collapse
thedamon profile image
Damon Muma

If I have config that isn't secret but does change from environment to environment I personally would store it in an env file that isn't in the gitignore. Do you recommend a different approach?