Masterclass | Node.js Configurations

Sdílet
Vložit
  • čas přidán 23. 11. 2023
  • In the beginning, there were configuration files. Every environment had one committed to a repository. Then, we discovered the beauty of 12-factor applications and of having environment-specific values set as environment variables.Then, NODE_ENV came along, and shattered our idyllic world.
    Libraries with millions of weekly downloads check for NODE_ENV=production to enable optimizations, changing the behaviour 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, questions began to arise. What value should be used for the staging environment? What about QA? Ultimately, if the same code isn’t run everywhere, we face being hit by bugs that cannot be reproduced across environments, which leads us to set NODE_ENV=production everywhere.
    In this masterclass, we explored:
    •Why managing configurations is important;
    •How to distinguish between environments;
    •What risks NODE_ENV can pose;
    •Node.js configuration best practices;
    •How to set up Node.js configurations with Platformatic
  • Věda a technologie

Komentáře • 4

  • @tusharbarate4973
    @tusharbarate4973 Před 6 měsíci

    Hey matteo! Good to know aboput config.
    Is there any documentation somewhere to read? It would be easy to follow

  • @user-tn8jb8if2q
    @user-tn8jb8if2q Před 6 měsíci +6

    It would be nice to have a version without the background music

  • @nikolaymatrosov
    @nikolaymatrosov Před 7 měsíci +1

    Music is too loud and annoying.