0.2.16 • Published 10 years ago

rest-confidence v0.2.16

Weekly downloads
35
License
-
Repository
github
Last release
10 years ago

rest-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 <path-to-your-config-json>

It runs on port 8000 by default. You can override it defining a PORT environment variable (e.g. PORT=8000 rest-confidence).

Clients

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

0.2.16

10 years ago

0.2.14

10 years ago

0.2.12

10 years ago

0.2.10

10 years ago

0.2.8

10 years ago

0.2.6

10 years ago

0.2.4

10 years ago

0.2.2

10 years ago

0.2.0

10 years ago