Configuration
Azu configuration properties are minimal this is to help you keep everything in a mental model without overloading your brain.
Overview
Azu configuration properties are minimal this is to help you keep everything in a mental model without overloading your brain.
Configuration properties lives within your application's main file.
Configuration Properties
Apps sometimes store config as constants in the code. This is a violation of the twelve-factor, which requires strict separation of config from code. Config varies substantially across deploys, code does not.
Azu follows the https://12factor.net/config standards this is why Azu first attempts to load configuration values from the environment first if not found then it loads from code.
We recommend for development use .env files.
.env
file.env.local
file.env.#{CRYSTAL_ENV}
file.env.#{CRYSTAL_ENV}.local
file
Important: Azu does NOT load the .env
files automatically. It is up to you the developer to use your preferred method to load environment variables.
Example
App Environments
By default Azu ships with the following environments:
Build
Development
Test
Integration
Acceptance
Pipeline
Staging
Production
The current application environment is determined via the CRYSTAL_ENV variable.
Use the following method to determine or compare environments
Middlewares
Finally, you must know how to start the server.
Last updated