mocker-api that creates mocks for REST APIs. It will be helpful when you try to test your application without the actual REST API server.
MIT License
Bot releases are visible (Hide)
https://github.com/jaywcjlove/mocker-api/compare/v2.3.2...v2.6.0
Command line supports more parameter configuration:
{
...
"mocker": {
"host": "127.0.0.1",
"port": 7788,
"pathRewrite": {
"^/api/repos/": "/repos/"
},
"changeHost": true,
...
}
}
Support setting parameters:
mocker mock/index.js --port 7788
mocker mock/index.js --host 0.0.0.0
help:
Usage: mocker <path> [--config] [--help|h]
Displays help information.
Options:
--config <path> Simple configuration
Example:
mocker mock/index.js
mocker mock/index.js --port 7788
mocker mock/index.js --host 0.0.0.0
mocker mock/m1.js test/m2.js
mocker mock/m1.js --config mocker.config.json
accessControlOptions
=>{}
Access Control Allow options.
{
accessControlOptions: {
'Access-Control-Allow-Methods': 'POST, GET, OPTIONS, PUT, DELETE',
}
}