https://github.com/devinus/confit
An Erlang configuration preserver
https://github.com/devinus/confit
Last synced: 7 months ago
JSON representation
An Erlang configuration preserver
- Host: GitHub
- URL: https://github.com/devinus/confit
- Owner: devinus
- License: unlicense
- Created: 2012-04-03T16:22:58.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2012-04-03T16:24:32.000Z (about 14 years ago)
- Last Synced: 2025-02-03T23:45:05.838Z (over 1 year ago)
- Language: Erlang
- Homepage: https://devinus.github.com/confit
- Size: 230 KB
- Stars: 6
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Confit - An Erlang configuration preserver
==========================================
Confit allows you to parse and store configuration values for your
applications to use during runtime.
Usage
-----
```erlang
confit:start_link(foo, "foo.config"),
Username = confit:get(foo, database, username)
```
### Parsing other configuration formats
Create a module to parse your configuration format and make sure it exports
a function `parse_file/1` that returns `{ok, Proplist}`. The `confit_parser`
behaviour specifies the interface. See `confit_term_parser.erl`.
For example, to use [Zucchini](https://github.com/devinus/zucchini):
```erlang
confit:start_link(foo, zucchini, "foo.ini"),
Username = confit:get(foo, database, username)
```