Answer the question
In order to leave comments, you need to log in
What is the difference between development and production environment variable? And what is it anyway?
What is the difference between development and production environment variable? And what is it anyway?
For example, this piece of code:
if (app.get('env') == 'development') {
app.use(morgan('dev'));
}else {
app.use(morgan('default'));
}
Answer the question
In order to leave comments, you need to log in
This is a variable that specifies which version of the project you want to run.
development - for development
production - for combat conditions
And depending on this, you can connect various plugins, components, modules to make development easier (debuggers, hot reloaded, etc.) And then you can easily disable them by changing the environment variable.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question