Sign inSign up

blankdev117/gomockserver

By blankdev117

•Updated over 5 years ago

An easily configurable API server that can provide mock responses for various HTTP requests.

Image
0

208

blankdev117/gomockserver repository overview

⁠gomockserver

A configurable mock server that helps with local debugging and testing when production apis can not or should not be used. Simply construct the apis needed that need to be mocked via json or other supported file type and allow gomockserver to serve your mock api!

⁠Usage

Simply add the docker volume to the api configuration files and gomockserver will do the rest!

Example docker compose:

image: blankdev117/gomockserver:0.0.1
volumes:
  - "./Mocks/apis:/app/data"
ports:
  - "7000:8080"

Example route configuration in .json:

{
    "routes": {
        "/*": {
            "get": {
                "statusCode": 200,
                "body": {
                    "Success": "Amazing!"
                }
            }
        },
        "/{tenantId}/hooray/{id}": {
            "post": {
                "statusCode": 201,
                "body": {
                    "id": "{{id}}",
                    "tenantId": "{{tenantId}}",
                    "IsGood": true
                }
            },
            "get": {
                "statusCode": 200
            }
        }
    }
} 

Currently supported file types: .json

⁠Project Reference

For more information and/or contribute to the project: https://github.com/BlankDev117/gomockserver⁠

Tag summary

Content type

Image

Digest

Size

6.1 MB

Last updated

over 5 years ago

docker pull blankdev117/gomockserver:0.0.4