Answer the question
In order to leave comments, you need to log in
Read .env file variables?
Hello. Tell me please. And how to count the variables of the .env file correctly?
I googled gem dotenv But it seems to be only for development mode, but what should I use in production then ?
Server under Windows.
Thank you.
Answer the question
In order to leave comments, you need to log in
The .env file is not intended for production
: the sysadmin must manually set the environment variables, either with the setx command in the bat file.
Environment variables can contain sensitive data that developers cannot know and also server addresses.
Successfully using .env in production. Where does the opinion come from that it is not for production?
You can use the same gem for production as well.
The whole point of moving data into ENV is not to write secrets in the source code, but to substitute them depending on the situation.
That is, in development we substitute one thing, and in production - another.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question