Skip to content

πŸ¦€ Example implementation of fakedata_generator as a webserver 🌍

License

Notifications You must be signed in to change notification settings

KevinGimbel/fakedata_server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

fakedata_server

Usage example for fakedata_generator

Table of Contents

About

⬆️ Back to Top

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.

Usage

⬆️ Back to Top

Rust

You can start the server with Rust by executing the following command.

$ cargo run

Docker

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.

Accessing the API

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 

Known issues

⬆️ Back to Top

  • For some reason the index route binds to localhost:8000/ with a / at the end but not to localhost:8000 (no /).

  • The Docker Container does not exit when pressing CTRL-C. When executed with -it you can press CTRL-P and CTRL-Q to detach from the container and then stop it with docker stop.

License

⬆️ Back to Top

MIT License Copyright (c) 2019 Kevin Gimbel

About

πŸ¦€ Example implementation of fakedata_generator as a webserver 🌍

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published