node-dotconfig
Easily create and read config files from the user's home directory.
- 🐝 Config files saved in
ini
format - 🏆 Cross-platform support for Windows, Linux and macOS.
- 💥 Typings readily available
- 🏄♂️ Promise-based API
- 🥑 Proper support for nested config objects
Read the docs.
Motivation
This utility is useful when you want to save .my-app
config files in the user's home directory. CLIs are well known to use this technique for saving user's preferences.
Installation
npm i node-dotconfig
Usage
;
Running the code above will create the file ~/.my-cli
with the following content:
[user]name=johndoeapiKey=12345
API
Licence
MIT © Carlos Roso