Node.js · Junior · Question 74 of 75
What does setting NODE_ENV=production usually do?
- 1Makes Node.js itself compile code to machine code
- 2Disables
console.log - ✓Correct answer: Tells libraries such as Express to enable production behavior: caching templates, less verbose errors
Explanation
Node.js itself does not treat NODE_ENV specially. It's a convention that frameworks and your own code read to switch behavior.