# NODE_ENV=production is a lie - Matteo Collina  [Fwdays Node.js]

# NODE_ENV=production is a lie - Matteo Collina [Fwdays Node.js]

633 Lượt nghe
# NODE_ENV=production is a lie - Matteo Collina [Fwdays Node.js]
This is a video from the Node.js fwdays'23 conference, which was held on December 2, 2023 https://fwdays.com/en/event/node-js-fwdays-2023 Talk description: In the beginning, there were configuration files. Each environment had one committed to our repositories. Then, we discovered the light of the 12-factor applications and having environment-specific values set as environment variables. Then, NODE_ENV came along, and it broke our idyllic world. Libraries with millions of weekly downloads check for NODE_ENV=production to enable optimizations, changing the behavior of applications. Given this worked so well, developers started loading configuration files (or secrets) based on the value of NODE_ENV to identify _their_ "production" environment. However, what value should be used for the staging environment? What about QA? If we don't run the same code everywhere, we will be hit by bugs that we cannot reproduce across environments. So, we set NODE_ENV=production everywhere. How should we distinguish across environments, then? Timecodes: 00:00 - Intro 00:49 - What is an Environment anyway? 03:41 - Ruby on Rails 04:26 - Problem 08:33 - Where did NODE_ENV come from? 10:20 - What about bundlers? 11:23 - Non-comprehensive list of libraries using NODE_ENV 12:58 - How to manage configuration? 14:23 - One Takeaway 15:06 - Replace | With 15:52 - Platformatic 17:03 - Demo Time! Talk and presentation: https://fwdays.com/en/event/node-js-fwdays-2023/review/node-env-production-is-a-lie More talks and videos from the conference: https://fwdays.com/en/event/node-js-fwdays-2023 Fwdays has been organizing large-scale conferences for developers for more than 14 years for the following spheres: JavaScript, .NET, Python, Data Science, PHP, QA, Highload, Architecture, DevOps, Databases. More information about actual events: https://fwdays.com/en/events Sign up to be the first to know about the opening of ticket sales with the best price: Facebook: https://www.facebook.com/fwdays Twitter: https://twitter.com/fwdays Telegram: https://t.me/+qOZXsXtA7vUzNWM6