This project provides a simple mock server, which works with the Chrome plugin parrot-mocker.
Please open your Chrome browser and visit index page first.
Then visit your test page, i.e. my demo, which will send 3 different requests(xhr/jsonp/fetch) after loaded.
In the plugin, input the mock server address and click the green button. The test page will reload automatically.
Now you will find that requests are forwarded to the mock server, which are also visiable at index page. If visiting other pages in the same domain, their requests will also be forwarded to this mock server.
Click any request in the list, and click 'Add'. Then this request is added to mock.
Open config page, now you can edit the mock data. Remember to click 'Apply' to really use the mock data.
Refresh your test page to check whether the mock is working correctly.
By default, the server is launched on port 8080.
Or you can specify the port by an environment variable.
PORT=8888 node ./server/index.js
Local index page is
http://127.0.0.1:8080. You should use this address as mock server in step 2, and other steps are similar with above.