The service can be started with the following environment variable overrides:
PORT: the vote service listening port (defaults to port 3000)
VOTES_API_URI: the votes API backend microservice (defaults to: http://votes:3000/)
REPORTS_API_URI: the reports API backend microservice (defaults to: http://reports:3000/)
This endpoint is used to cast a vote.
application/json
vote - string; currently restricted to either "a" or "b"{
"vote": "a"
}
This endpoint is used to query the voting results.
application/json
success - boolean
result - object; present only if success. The object has a property named for each vote ("a", "b"); the value of the property is a number corresponding to the number of votes cast.
reason - string; present only if success is false.
{
"success": true,
"result": {
"a": 5,
"b": 3
}
}
Content type
Image
Digest
Size
17.5 MB
Last updated
almost 8 years ago
docker pull subfuzion/vote-api