c9h (cottonmouth) is a setup collection greatly influenced by Steve Francis’ Viper plan for Go. It’s readily available on NPM (
c9h) and also you can discover it on GitHub.
It’s pitched as a zero-config config that ships with practical defaults (you can rise and also keeping up simply one line:
const config = need('c9h')()), yet if you wish to give alternatives, it in fact ends up being rather extensible.
Right here’s my buzzwordy function listing drew from the README:
📁 One collection, numerous styles. JSON, JSON5, INI, YAML, and also TOML are all sustained out-of-the-box as documents styles!
💻 Atmosphere variables. Manage atmosphere variables as a resource of setup easily!
💯 Absolutely no setup.
c9hfunctions out-of-the-box utilizing practical defaults without any setup needed!
💪 Typescript. Completely entered and also self-documenting.
🛠 Extensible. Bring your very own documents style parsers if we do not sustain your setup data natively!
The suggestion with extensibility is that c9h focuses on parser user interfaces. It ships with parsers for JSON(5), INI, YAML, and also TOML, yet you can give your very own parsers to deal with various other documents styles if needed!
I have actually likewise begun work with a fastify plugin (fastify-c9h) which enhances Fastify circumstances with your packed setup worths.
This is even more of a knowing workout for me, instead of attempting to supply something ingenious or brand-new, and also I make sure that there’s lots of well established config parsers currently available. I simply wish to attempt and also produce something from the ground up that ideally gets to a rather completed state. However, any type of responses, suggestions, or payments are certainly welcome!