Config is a base module that helps you organize data through your application

Usage no npm install needed!

<script type="module">
  import acaiConfig from 'https://cdn.skypack.dev/@acai/config';


Açai Config Module

Support https://www.npmjs.com/package/@acai/config NPM

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.


import config from "https://deno.land/x/acai_config/mod.ts";

// access your env variables with
// or

// you can access your config with
// or

// 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
// will fetch env from .env.production