Usage example for fakedata_generator
fakedata_server
is a showcase API implementing "fakedata_generator as a service". It provides an "API" that can return random data (one entry at a time) for GET requests.
You can start the server with Rust by executing the following command.
$ cargo run
There is a Docker image available at https://hub.docker.com/r/kevingimbel/fakedata_server.
You can start the fakedata_server
with the following command.
$ docker run -it --rm -p 8000:8000 kevingimbel/fakedata_server
The container cannot be exited with CTRL-C
, see Known issues.
After starting the server in either of the two ways listed above, you can access http://localhost:8000/. The /
is required, see Known issues.
$ curl localhost:8000/gen/corpora/cat
$ curl localhost:8000/gen/username
$ curl localhost:8000/gen/domain
-
For some reason the index route binds to
localhost:8000/
with a/
at the end but not tolocalhost:8000
(no/
). -
The Docker Container does not exit when pressing
CTRL-C
. When executed with-it
you can pressCTRL-P
andCTRL-Q
to detach from the container and then stop it withdocker stop
.
MIT License Copyright (c) 2019 Kevin Gimbel