8000 GitHub - cetai-org/docker-mocks-server: Mock server based on Node Express and connect-api-mocker. It can run on localhost or as a Docker image.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

cetai-org/docker-mocks-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 63.2%
  • Dockerfile 36.8%
0