This document explains how configuration is managed across the hexaFn project. It includes environment variables, default settings, runtime parameters, and CI/CD setup.
hexaFn uses environment variables and structured config files to control runtime behavior, development flags, and integrations. All configurations are centralized to ensure transparency and easy modification.
Environment-specific settings can be defined in a .env file or exported manually in the shell.
| Variable | Description | Default |
|---|---|---|
HEXA_ENV |
Application mode (dev, prod) |
dev |
HEXA_PORT |
Port used by the local server | 3000 |
HEXA_DEBUG |
Enable debug logs (true/false) |
true |
Ensure
.envfiles are excluded from version control via.gitignore.
You can customize behavior at runtime using CLI arguments:
cargo run -- --env prod --debug false --port 8080| Parameter | Description | Default |
|---|---|---|
env |
Environment mode | dev |
port |
Server port | 3000 |
debug |
Enable logging | true |
- GitHub Actions: Configured via
.github/workflows/*.yml- Includes linting, tests, and formatting checks
- Rust Toolchain: Managed using
rust-toolchain.toml - Formatting: Enforced using
rustfmt.toml - Lints: Defined in
Clippy.tomlor inline via attributes
- Always use branch-specific
.envvariants when testing features. - Validate changes using
cargo checkand CI pipelines before merging. - Do not expose secrets or API keys in the repo.
HEXA_ENV=prod
HEXA_PORT=8080
HEXA_DEBUG=false# Load environment and run
source .env && cargo run
# Test with custom config
HEXA_ENV=test HEXA_PORT=8888 cargo testThis guide helps contributors safely configure and run the project in various environments.