DEV Community

Discussion on: Environment variables in Node.js. The Right way!

Collapse
 
numtostr profile image
Vikas Raj

You can include .env.development in the source control. But make sure It doesn't contain any actual keys. Because thats the whole point of secret.

The way I do is I make a .env.sample file with all the env but without any secret or api keys.

Collapse
 
mi1682516 profile image
mi1682516

What do you mean when you say it doesn't contain actual keys? How did the other developer run test like i did on my local when it doesn't contain actual keys?