As per the twelve-factor standards (recall the, Twelve-factor app of microservices, section in Chapter 1, Debunking Microservices), one code base should suffice for multiple environments, such as QA, dev, production, and so on. Ensure that we have the application properties file in our application, where we can specify the environment name and environment-related stuff. Config (https://www.npmjs.com/package/config) is one such module, which helps you in organizing all configurations. This module just reads configurations files in the ./config directory (it should be at the same level as package.json).
Salient features of config are as follows:
- It can support formats such as YAML, YML, JSON, CSV, XML.