App configuration using ENV
for Crystal applications inspired by figaro.
Add this to your application's shard.yml
:
dependencies:
ambience:
github: vjdhama/ambience
version: 0.4.2
require "ambience"
Ambience.application("configuration_file_path", "environment")
Ambience.load
Refer example kemal application for more insight.
api_url: example.com
development:
app_id: foobar123
app_key: barfoo123
production:
app_id: bar123foo
app_key: 123foobar
##TODO'S
- Convenience Proxy Methods.
- Required keys convenience method.
- Cli for Ambience.
- Add examples for frost.
- Add examples for kemal.
- Fork it ( https://github.com/vjdhama/ambience/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- vjdhama - Vijay Dhama : creator, maintainer