Skip to content

Mock server based on Node Express and connect-api-mocker. It can run on localhost or as a Docker image.

Notifications You must be signed in to change notification settings

peterknezek/docker-mocks-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mock server

Mock server based on Node Express and connect-api-mocker. It can run on localhost or as a Docker image.

Run on localhost

npm run start

How to add mocks?

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

Environment variables

  • MOCKS_PORT - server port - defaults to 8080

Docker

Build Docker image

docker build --pull --rm -f "Dockerfile" -t dockermockserver:latest "."

Run Docker image

docker run --rm -d -p 8080:8080/tcp dockermockserver:latest

About

Mock server based on Node Express and connect-api-mocker. It can run on localhost or as a Docker image.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published