Docker image of https://github.com/qandidate-labs/qandidate-toggle-api
1.7K
An API for managing your toggles, uses Redis to store the toggle collection.
Read our blog post series about this repository at:
Install the dependencies with composer:
$ composer install
Configuration is determined based on environment variables. Copy .env.dist to .env and adjust where needed.
You can override the values in the file with environment values.
The default configuration is mainly for local development.
The environment variable TOGGLE__ALLOWED_ORIGINS should be valid JSON. This is to allow arrays.
We use PHPUnit, so to run the tests simply run:
$ vendor/bin/phpunit
With your favorite webserver (or with php -S for local testing) point your document root to the web folder.
GET /toggles
PUT /toggles/{name}
Example request:
{
"conditions" : [
{
"name" : "operator-condition",
"operator" : {
"name" : "less-than",
"value" : "1337"
},
"key" : "user_id"
}
],
"name" : "foo",
"status" : "conditionally-active",
"originalName" : "foo"
}
NOTE: PUT doesn't remove the previous toggle if you rename it. So if you want to rename foo to bar, you would have to PUT bar and DELETE foo.
DELETE /toggles/{name}
MIT, see LICENSE.
Content type
Image
Digest
Size
250.7 MB
Last updated
almost 7 years ago
docker pull iamluc/qandidate-toggle-api