A simple configuration file loader and compositor utility.

This page summarizes the projects mentioned and recommended in the original post on /r/node

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • node-config

    Node.js Application Configuration

  • Thank you for your detailed answer. I think you did miss the correct approach to using ENV vars in the config module, which would be to have a separate file called 'custom-environment-variables.json' that maps your environment variables to the right property. For example: config/default.js module.exports = { db: { user: 'dev-user', password: '123456', host: 'db', name: 'application' } } config/custom-environment-variables.json { "db": { "user": "DB_USER", "password": "DB_PASSWORD", "host": "DB_HOST" } } db.js const dbConfig = require('config').get('db'); console.log(dbConfig); Run: DB_USER=prod-user DB_PASSWORD=abcdef DB_HOST=prod node db.js Output: { "user": "prod-user", "password": "abcdef", "host": "db", "name": "application" } Config composition is actually configs greatest feature I would say. Though the priority chain in the config module is hardcoded (see: https://github.com/lorenwest/node-config/wiki/Configuration-Files), while in yours you can actually which source takes priority.

  • config-discovery

    A simple JSON configuration loading and compositing utility.

  • Github: link NPM: link

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts