http mocking server with simple config written on nodejs
npm install mockymocky - http mocking server with simple config written on nodejs

```
npm install mocky
Create new mock.js file with content
`js
var mocky = require('mocky');
mocky.createServer([{
// simple GET route without request body to match
url: '/someurl1?a=b&c=d',
method: 'get',
res: 'response for GET request'
}, {
// POST route with request body to match and respose with status, headers and body
url: '/someurl2?a=b&c=d',
method: 'post',
req: 'POST request body to match',
res: {
status: 202,
headers: {'Content-type': 'text/html'},
body: '
`
That's all now you can run mock server node mock.js, afterGET
that if you send request to http://127.0.0.1:4321/someurl1?a=b&c=d andresponse for GET request
get to the client, send POST request tohttp://127.0.0.1:4321/someurl?a=b&c=d with body POST request body to match
... and so on, just try it.
It's very handy to auto record requests, do it somewhere at start of your main
app file
`js`
mocky.recorder.start({print: true});
After that all http/https requests will be logged into console immediately after
execution.
You also can manually control recorder - start recorder then after someoutputs
requests occures you can manually process recorder e.g.
`js`
console.log(mocky.recorder.outputs)
You also can stop recorder and clear outputs.
`js`
mocky.recorder.stop();
mocky.recorder.clean();
Into cloned repository run
```
npm test