Do you need to explicitly set NODE_ENV=production?

Surprisingly this wasnt answered in any of the forums ive seen here. I wonder if it is essential to set this environment variable in NodeJS? Ive seen that railway provides this variable in the form of RAILWAY_ENVIRONMENT=production. Will NodeJS use this variable and know if it is in production mode?
3 Replies
Percy
Percy17mo ago
Project ID: N/A
RyanKnack
RyanKnack17mo ago
N/A
Brody
Brody17mo ago
pretty damn sure NODE_ENV does get set to production, because I know for a fact CI gets set to true
Want results from more Discord servers?
Add your server