1.1.0-beta.4 • Published 2 years ago
@acai/config v1.1.0-beta.4
Açai Config Module
Açai config module is a small tool that helps you handle data inside of your application. It exports a global config by default, and an option to create a scoped config.
Usage
import config from "https://deno.land/x/acai_config/mod.ts";
// access your env variables with
console.log(config.env);
// or
console.log(config.getEnv("key"));
// you can access your config with
console.log(config.config);
// or
console.log(config.getConfig("key"));
// you can also set a config with
config.setConfig("key", "value");
If you wish to bind your env variables with your config variables, you can call config.fetchEnv(undefined, true)
, this will store all your env variables inside of the config.
Optional envs
By default, config will try to fetch from .env
, but you can pass a preset to try. If not found, it will alert on the console and try to fetch .env instead.
import config from "https://deno.land/x/acai_config/mod.ts";
// will fetch env from .env.testing
config.fetchEnv("testing");
// will fetch env from .env.production
config.fetchEnv("production");
1.1.0-beta.4
2 years ago
1.1.0-beta.3
3 years ago
1.1.0-beta.2
3 years ago
1.1.0-beta.1
3 years ago
1.1.0-beta.0
3 years ago
1.1.0-alpha3
3 years ago
1.1.0-alpha2
3 years ago
1.1.0-alpha
3 years ago
1.0.0
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago
1.3.0
4 years ago
1.2.0
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.0
4 years ago
1.0.1
4 years ago