Yet another debugging proxy.
Key features
- Hijacking HTTP(s) requests with node.js
- Full-featured routing
- Various upstream type
Install mocker with following command:
npm i -g @gzzhanghao/mocker
Check out the Getting Started tutorial for a quick Getting Started guide.
Or check out the Documentation for detailed usage.
Further, check out the mocker-utils package, which packed a set of utility functions. It is really helpful when building a large mockup script project.
Mocker is written in ES2015, so make sure your node.js supports ES0215 features such as generator.
Setup
git clone https://github.com/gzzhanghao/mocker.git
cd mocker && npm i
Then you can either build mocker once:
npm run build
or let mocker build incrementally when files changed:
npm run watch
Tests
Tests are missing, it'll be great if you can bring it to us. :P