Sign inSign up

lav45/mock-server

By lav45

•Updated 18 days ago

HTTP mocking application for testing and fast prototyping

Image
Web servers
0

10K+

lav45/mock-server repository overview

⁠Mock Server

HTTP mocking application for testing and fast prototyping

GitHub⁠

⁠Quick start

Create mock file ./mocks/index.json and put the content in it

[
    {
        "request": {
            "method": "GET",
            "path": "/"
        },
        "response": {
            "type": "content",
            "body": {
                "text": "Hello world!"
            }
        }
    }
]

Starting the Mock Server

~$ docker run --rm -it -v $(pwd)/mocks:/app/mocks -p 8080:8080 lav45/mock-server:latest

Checking

~$ curl -i http://127.0.0.1:8080
HTTP/1.1 200 OK
content-type: application/json
connection: keep-alive
keep-alive: timeout=15
date: Sat, 20 Jun 2026 19:47:09 GMT
transfer-encoding: chunked

{"text":"Hello world!"}

Tag summary

Content type

Image

Digest

sha256:ad4990341…

Size

23.9 MB

Last updated

18 days ago

docker pull lav45/mock-server