Mock server based on Node Express
and connect-api-mocker
. It can run on localhost or as a Docker image.
npm run start
Follow the directory structure of connect-api-mocker with some changes in mind. Or extract responses from file (.har) by har-to-mocks
Example REST service: GET /messages
Directory Structure:
_ mocks
\_ messages
\_ GET.json
MOCKS_PORT
- server port - defaults to8080
docker build --pull --rm -f "Dockerfile" -t dockermockserver:latest "."
docker run --rm -d -p 8080:8080/tcp dockermockserver:latest