amberframework / amber

A Crystal web framework that makes building applications fast, simple, and enjoyable. Get started with quick prototyping, less bugs, and blazing fast performance.
https://amberframework.org
MIT License
2.58k stars 206 forks source link

Feature: Unify the API for config vars #1325

Open a-alhusaini opened 1 year ago

a-alhusaini commented 1 year ago

Original Message Deleted

It turned out that this feature was already implemented in Amber. But no one documented it.

You can override values defined inside .yml files in the config/settings.cr file. It essentially acheives the goals of this issue: Which is to provide a clean API for accessing configuration variables.

TODO: Document this feature.

crimson-knight commented 1 year ago

I like this.

Right now I can say that if there is an ENV declared that does exist in one of the environment yaml files, Amber will prefer the ENV declaration over the yaml file version.