Skip to content

🐵 HTTP mock server, useful to stub services and simulate dynamic API responses, leveraging ASP.NET Core features, built-in fake data generation and pure C# scripting

License

Notifications You must be signed in to change notification settings

natenho/Mockaco

Repository files navigation

Mockaco Mockaco

Mockaco is an HTTP-based API mock server with fast setup.

Main Build Docker Pulls Nuget FOSSA Status

Features

  • Simple JSON-based configuration
  • Pure C# scripting - you don't need to learn a new specific language or API to configure your mocks
  • Fake data generation - built-in fake data generation
  • Callback support - trigger another service call when a request hits your mocked API
  • State support - stateful mock support allow a mock to be returned based on a global variable previously set by another mock
  • Portable - runs in any .NET Core compatible environment

Mocking APIs with Mockaco | .NET 7

Get Started

Running the application

.NET CLI

Install and run as a dotnet tool:

$ dotnet tool install -g mockaco
$ mockaco --urls "http://localhost:5000"

A random local port is chosen if --urls parameter is not provided.

Docker

You can run Mockaco from the official Docker image (replace /your/folder with an existing directory of your preference):

$ docker run -it --rm -p 5000:5000 -v /your/folder:/app/Mocks natenho/mockaco

The port exposed by the container is 5000 (HTTP) by default.

Sources

Or your can run it directly from sources:

$ git clone https://github.com/natenho/Mockaco.git
$ cd Mockaco\src\Mockaco
$ dotnet run

A random local port is chosen if --urls parameter is not provided.

--

Icon made by Freepik from www.flaticon.com is licensed by CC 3.0 BY

License

FOSSA Status