Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d0rc/sweetconfig
something to forget about configuration in releases
https://github.com/d0rc/sweetconfig
Last synced: 3 months ago
JSON representation
something to forget about configuration in releases
- Host: GitHub
- URL: https://github.com/d0rc/sweetconfig
- Owner: d0rc
- Created: 2014-06-14T18:29:00.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-06-28T21:29:49.000Z (over 10 years ago)
- Last Synced: 2024-08-02T02:11:32.979Z (6 months ago)
- Language: Elixir
- Size: 199 KB
- Stars: 3
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Read YAML configuration files from any point at your app. (Configuration)
- fucking-awesome-elixir - sweetconfig - Read YAML configuration files from any point at your app. (Configuration)
- awesome-elixir - sweetconfig - Read YAML configuration files from any point at your app. (Configuration)
README
Sweetconfig
===========[![Build Status](https://travis-ci.org/d0rc/sweetconfig.png?branch=master "Build Status")](http://travis-ci.org/d0rc/sweetconfig)
Place configuration YAML files in `priv/` directory of your root application. Add following section to your `config.exs` file:
```elixir
config :sweetconfig,
app: :name_of_your_application
```Include `:sweetconfig` into your app deps list.
Now you can read configuration from any point at your app like this:
```elixir
Sweetconfig.get :somekey
Sweetconfig.get [:somekey, :somesubkey]
Sweetconfig.get :whatever, :default_value
```TBD: notification service on configuration changes.