Node Configurenv

The Problem

I write alot of backend in Javascript, this means I was copying around the same config.js file, and tweaking it to fit for the new app. These apps were always dockerized, and required the flexability of configuration through environment variables, but when testing locally I would use a JSON file.

The problem here is this one snippet has been put in atleast 30 places, and I recently found a bug in it, which ment updating 30 different applications.

The Solution

Node-Configurenv.

This library allows you to define a configuraion structure, and have it automatically parse it out, either from env, file or command line arguments.

The library was quickly hacked together, but I am in the process of remaking it under a new name, wrenchjs or just wrench.

Wrench will have a modular design, with different providers which will provide configuration types, like JSON, YAML, TOML, Environment Variables and Command Line. Wrench will be similar to libraries like viper and ruby-parseconfig. I might end up porting Wrench to more than JS (say python & go), and include other frameworks like Deno.

Project link: https://github.com/HexF/node-configurenv

Nifty tech tag lists fromĀ Wouter Beeftink