0.9.1 • Published 4 years ago

mockrize v0.9.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

mockrize

Create RESTful API mock server easily, according to directory structures of your repository.

GitHub Action codecov Latest Stable Version

Example

Given you have this structure:

.
├── server.js
└── root
    ├── foo
    │   └── baa.json
    └── hello
        └── :name
            ├── index.js
            └── update.js

You server.js looks like:

const mockrize = require('mockrize');

const app = await mockrize({
    rootDir: './root',
});

app.listen(4001);

Kick node server.js, then

% node server.js
GET /foo/baa
GET /hello/:name
POST /hello/:name/update

Those endpoints are automatically generated.

Why?

It's always paiful to make agreement between server-devs and frontend-devs on how API req/res should look like. We've had headache when we manage "sandbox" or "mock" API services WITHOUT permission control then changes make things chaotic.

This mockrize package can provide a way to create HTTP RESTful API mock server based on the folder structure of your git repository, which means you can control write/read permission and track the change logs of your mock-API.

TODOs and Issues

0.9.0

4 years ago

0.9.1

4 years ago

0.8.0

4 years ago

0.4.0

4 years ago

0.2.0

4 years ago

0.1.4

4 years ago

0.1.2

4 years ago

0.1.0

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago