A simple HTTP Server to be used for the unit or end-to-end or integrations tests.
- yaml based configuration, see an example config file.
- docker image is published in this repo and on the docker hub
docker run -p 8080:8080 -v $(pwd)/example_config.yaml:/config.yaml -e CONFIG=config.yaml ghcr.io/sv-tools/mock-http-server:latest
in second shell
curl http://localhost:8080/users -H"X-Request-Id: 123"
> {"id":1,"name":"John","id":2,"name":"Jane"}
curl http://localhost:8080/users/1 -H"X-Request-Id: 123"
> {"id":1,"name":"John"}
MIT licensed. See the bundled LICENSE file for more details.