boolean as a service
Run node index.js or npm start to start the server. The baas service will
run on port 8000 by default. You can also use the Docker Image
kevingimbel/baas. See the Docker
description below for more information.
Inside config.js a port can be specified. This is the port the HTTP Server will bind to.
Returns a "true" boolean in JSON.
{"boolean": true}Returns a "false" boolean in JSON.
{"boolean": false}Returns a random boolean in JSON.
Response: Can be true or false
{"boolean": true}{"boolean": false}All other requests will return the default baas description.
{
"baas": "boolean as a service",
"endpoints": {
"/true": "returns true",
"/false": "returns false",
"/random": "returns random boolean"
},
"boolean": "none"
}baas is available as Docker image on Docker Hub at
kevingimbel/baas. This is the
official Docker image for baas.
The Docker image uses the default config.js file and exposes port 8000. To
usea different port, run the image with the -p flag like shown below.
$ docker run --rm -d -p "1337:8000" kevingimbel/baasThe above command will make baas available at port 1337. Open localhost:1337
to see the baas default page.