jim-bot
Web interace which generates 10 sentences of random corporate gibberish.
Based on pocket-jim. Ported from C to Go.
Usage
Build and run container using Podman:
# clone git repo
git clone https://git.pablotron.org/jim-bot
# switch to cloned directory
cd jim-bot
# build container
podman build -t jim-bot:latest .
# run container bound to localhost:8080
podman run -d -p 8080:8080 --restart=on-failure --name jim-bot jim-bot:latest
Then open http://localhost:8080/ in your browser.
By default the sentences are returned as plain text delimited by
newlines. If the request method is POST and the Accept
header is set
to application/json
, then the sentences are returned as a
JSON-encoded array.
Example:
$ curl -X POST -H 'accept: application/json' http://localhost:8080/
["uniquely myocardinate communities",...
Build
To build locally (requires Go):
# build ./jim-bot
make
# run jim-bot on localhost:8080
./jim-bot
Then open http://localhost:8080/ in your browser.
Tests
Running tests:
# run unit tests
make test
# run `go vet` and `staticcheck`
make check
Note: The check
target requires staticcheck.