Standard Library
Config & Env

Config Module (config)

The config module provides access to environment variables loaded from .env files and the system environment.

Environment Variables

Flowa automatically loads variables from a .env file in the current working directory.

Accessing Variables

You can access variables using the env object:

let app_name = env.APP_NAME;
let debug_mode = env.DEBUG;
let api_key = env.API_KEY;
 
if (env.APP_ENV == "production") {
    print("Running in production");
}

Configuration File (.env)

Create a .env file in your project root:

APP_NAME=MyFlowaApp
APP_VERSION=1.0.0
DEBUG=true
API_KEY=secret_key_123