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
Percy2y ago
Project ID: N/A
RyanKnack
RyanKnackOP2y ago
N/A
Brody
Brody2y 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