This is a uber-simple but powerful configuration server
npm install rest-confidencerest-confidence
===============
This is a simple yet powerful configuration server. Tired of configuring many components in many different environments? Rest-confidence centralizes your settings and exposes them as a REST service.
Other use cases include using it as a service directory or as a foundation for A/B testing (read more). It uses confidence, with all it niceties now remotelly accesible through a simple REST service.
Configuration example
---------------------
```
{
"key1": "value",
"key2": {
"$filter": "env",
"production": {
"limit": 200
},
"$default": {
"limit": 10
}
},
"$meta": {
"anykey": "anyvalue" // comments are also fine
}
}
GET /
``
{
"key1": "value",
"key2": {
"limit": 10
}
}
GET /key2
``
{
"limit": 10
}
GET /key2?env=production
``
{
"limit": 200
}
GET /__raw
Gets the raw configuration file contents.
Install & run the server
------------------------
``
npm install -g rest-confidence
rest-confidence
It runs on port 8000 by default. You can override it defining a PORT environment variable (e.g. `PORT=8000 rest-confidence``).
Clients
-------
- node.js: rest-confidence-client
- python: rest-confidence-client-python (contributions are welcome)
TODO
----
- Allow multiple configuration files / modules
- Java client
- Send broadcast datagrams to make itself visible to the clients (under evaluation)
- Allow clients to subscribe and get notifications when a file/path changes.
- Managment capabilities: PUT / POST methods (low priority)
- Simple web UI (low priority)
- Multitenant (very low priority, under evaluation)
License
-------
MIT