"Inspired" by https://github.com/hotheadhacker/no-as-a-service, from where I copied the list of reasons as well.
Not intended for productive usage, though requests are logged and limited by IP to 100/minute.
Build using ./build.sh -b
Run as a CLI (prints a random reason):
$ ./bin/naas
╭───────────────────────────────────────────────────────────────╮
│ │
│ 👎 I've never been so sure of anything as I am of saying no. │
│ │
╰───────────────────────────────────────────────────────────────╯Run as a service (API and web UI):
NAAS_PORT=3939 ./bin/naas -serveRun using docker-compose:
docker-compose -f docker/docker-compose.yml upThis will start the service with the -serve flag automatically.
The service includes a simple web UI for exploring the reasons interactively. Open your browser and navigate to http://localhost:3939 (or the port you configured) after starting the service. The UI is served from the root path (/) and allows you to get random reasons with a button click.
/noreturns a JSON object with a random reason./pingreturns status 200 (for health check)./versionreturns a JSON object with version info./debug(when started with environmentNAAS_DEBUG=true) exposes thepprofendpoints.
Example Request:
GET /noExample response:
{
"reason": "I've never been so sure of anything as I am of saying no."
}