Yet another configuration/environment file
A lightweight and dead simple package meant as a replacement for dotenv
which can quickly load YAML files.
Note: This package is ES6-only. It doesn't support CommonJS.
It's simple! Just put a conf.yml
file in the root of your project (as in, the directory which you run node
from), and you can import it into your project using yacef/default
:
import config from "yacef/default";
// ...
config
will automatically be the parsed version of your conf.yml
file. If you'd like to specify the path to a different YAML file, that's also possible:
import yacef from "yacef";
const config = yacef("./path/to/file.yml");
That's how easy it is!
This package was made by me for Yuuper. This package is licensed under MIT.