{"_id":"mockable","_rev":"27-0e9974b2422ba9d241cafa69933d6bde","name":"mockable","description":"Quick and dirty API mocking for your client","dist-tags":{"latest":"1.0.10"},"versions":{"0.0.1":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"0.0.1","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@0.0.1","dist":{"shasum":"43b9a333eb87c9300fb1cd99ac755bfec5d5e77e","tarball":"https://registry.npmjs.org/mockable/-/mockable-0.0.1.tgz","integrity":"sha512-jGqrHGGhmulLskLRmwvbXLm4PRxM6mVNI7kBWikm+ggEHueWhpsHaS/LC5q57bkeSDvL70DsA/mIsVvqev96Dw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAUCvjhiW9Xqc9TMNdxO/pie7KBQMj25hmv2WICKIgHAAiBc2OLjxiXt5f9DSpNjQmw+NPmG5UKKg4FNM4jq0x3xng=="}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.0":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.0","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.0","dist":{"shasum":"e84d3403c1991556858b0eed7b9c5357f47f83ee","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.0.tgz","integrity":"sha512-mMF4wGkecPw7aMuRXTTVNpOzNeSiEYiigY/Amdofq0e9df5nYKG58fxJcrAGlVOTzav8m8CuVUkFBPMb46PCvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC43hzpStG8Pfo5R67JIr2MqQVx6IVtCBpJn1VZYqbiDAIhAKZH6S665ePLa41DErUNQ7OmnB2dFbNvV+4XWWo5Sy+z"}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.1":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.1","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.1","dist":{"shasum":"bffa7b6f6ef4c330121215efa2962b8bf5a313d3","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.1.tgz","integrity":"sha512-k7HpWurJGYgT+bpu274e96hzlv2SbQ91JxvdFfRx99ZQfQGjspCUwV6d/vWlq+EvacHX5KoFceIXHgici6fpUw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKstaXrWfYsDZwR81T+Ld8b7SVHeyyQ49K2r+IaY9EuAIhAPWbWi4EGCvCsBZgC+TjaiILd4TI9/TD1jh5ThtgPgdw"}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.2":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.2","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","preferGlobal":"true","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.2","dist":{"shasum":"09c8e793c6b8585f15e4931723c6e8bafa888c6d","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.2.tgz","integrity":"sha512-lfyipRGnkNKLQ4wee9FWkTGxIDAmvXlvZx+pI0Xiuo81TaYl7eiaaUSTBubg567d47yGVGIE8uUlenGZQevGGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHWJ3CidJyV+D5vsSrVy9rGAlERlDnQNtCPXoXSsxq/nAiEAlwxASlyxavYU9jO/N/lAcJCAWqEy6F6AIVUSINZ3/wA="}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.3":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.3","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"lib/mockable.js","preferGlobal":"true","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.3","dist":{"shasum":"15c9e1121a48c8346b9bfc9a48ff117d603df29e","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.3.tgz","integrity":"sha512-6iEPm1xPuzdMvBhJQ1La7ar9Q8ZgNQdGF2ihpy+dODFkQt2rMI2yIYrG6+bzkO9PkUyRPhJBUFlDgOMUSia4Ow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNzdb/BPZJ6a2NTKn/2k7DagWFIbxDHh69q2NAnj5B3QIhAPK7QketUoI0DuzbGMBROkQ3fhv+W5XKJERMkSgBRNV3"}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.4":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.4","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"lib/mockable.js","preferGlobal":"true","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.4","dist":{"shasum":"d35238dc37a1cdf785e1dea50132e0e1e5990059","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.4.tgz","integrity":"sha512-4p6B03AePDbzxlrM/Ivk5CBc7i0Uq7vGeQBAEMHkifIHn9RwIis+RWEc0zgLV8dGJVwpeHdL01vi0YHkqtb4gw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDPIRaCgOXVSQzGd84gfEMBoJROusV6bDUtRITMeH5suAiAb1yY8DSOPpKXPD68ArCSj5j8n1ra3pID4k1KSJdq/Gw=="}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.5":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.5","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"bin/cli.js","preferGlobal":"true","bin":{"mockable":"bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.5","dist":{"shasum":"8d7322412b3dfa74273be13031f3a1c246976936","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.5.tgz","integrity":"sha512-zUs2HxSiE5h61wX6VZsCTy3p3345aP8MTKpYYVO733L7eCsKDUTAKb6/+2aK8wAntdgBAjxU2RDzXOXhzXzTWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2ThTkMjaXu7ghaz86bDYdx+L+2qP7bNDo1Stde741zgIhAITi/+SyI47t5okEyf2mxUbncCe/Ry07qGsTc1eTbE6d"}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.6":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.6","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","preferGlobal":"true","bin":{"mockable":"./bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.6","dist":{"shasum":"b62192dd81fc72392320f5319ae468a814c89810","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.6.tgz","integrity":"sha512-arY5G+NNFy3pSEdzS+hMUkUtetl6euPOiPsL6R3PVX+yRUcH2QmX/8Df2yQ7lyzQZlRYrEevnV4HyhaS8dhSVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICjDdCNGzbIMfK+dTsDH7dPN0z5VPLCjLLfrfNWDKYzJAiEA0DZAhNCFf9nC2MRU83H4vGtIaPS1gKXcRZnt+v7YraM="}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.7":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.7","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","preferGlobal":"true","bin":{"mockable":"./bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.7","dist":{"shasum":"fe87ea3509049ec70e53b7c609e2cd851fe8d407","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.7.tgz","integrity":"sha512-13e+MycOTL2prHz6/a/WLle03jomEn0H56MEFgRlsGKjwEExRcPDyHg/tldv0WS0bT6LrIwTx9pLvWK4LwUwVA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRLYSGcQiV/aiS3KxBoc0CRwc0jSPZQiKZQ3jWk8a2zgIgJtC23C3RNwSq5BwxzDnLtHOHC5EqJ6+O9F4f0g17J/4="}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.8":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.8","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","preferGlobal":"true","bin":{"mockable":"./bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.8","dist":{"shasum":"8ac9a12fb1dba5a436ab63f0fe83e587b56d66ed","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.8.tgz","integrity":"sha512-G3/Dok6RbA3pZNCmP+FAf+Buku5lelLJ7vHbSoBO3lRooxcue2iRPDCV9VjfmvMua/76Y8k4eTRSMp0IyXOz4Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk58r1oVogOPfP0F+yN1xksC9VqSta+eyn6S8QSuShIgIhAKY3cI2GDk0tzJfeytbphGUxSck6wfnfBzfQPx1KieaM"}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.9":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.9","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","preferGlobal":"true","bin":{"mockable":"./bin/cli.js"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.9","dist":{"shasum":"9ae7f6b130b9fb86ecd2984e08e2db8b7dc9b43d","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.9.tgz","integrity":"sha512-VGLnBIYAgeK9rcX3U+UUs6vzmcV9i/YzgCn3pO6gaqTfYUx4Vxlhi5aYzKDe+0/OCOE8FM2znDshB6xoleZ38g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6atSrFdAjvfb70m7GOGhAJztn8nQId1xC6Zx41hM0mwIgdZsWuyR/JYFoiKyzvq5u787es+ney8BWWYGdrzKOT/I="}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]},"1.0.10":{"name":"mockable","description":"Quick and dirty API mocking for your client","version":"1.0.10","url":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"main":"./lib/mockable.js","preferGlobal":"true","bin":{"mockable":"./bin/cli.js"},"scripts":{"test":"vows test/mockable-tests.js --spec"},"license":"MIT","dependencies":{"node-static":"~0.7.4","optimist":">=0.3.4"},"devDependencies":{"request":"latest","vows":"latest"},"engines":{"node":">= 0.4.1"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"homepage":"https://github.com/ricardo-rossi/Mockable","_id":"mockable@1.0.10","dist":{"shasum":"3995d7084bada4b47832ae736efd11c417bf23f2","tarball":"https://registry.npmjs.org/mockable/-/mockable-1.0.10.tgz","integrity":"sha512-RG5J1mdOPJBNsCo7bS7WBmlbKtaXI5PhEtwAFrOlaNrbqxUENHRi+MlGnzZDK+L99D61AZL4oNCvxZRTAdu9KQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQzOJQ2W9vYH5uh//Wh1pF5V74XPEAHqAiWx4qyyoomAIhAPQ67j31MxjkJtOOykkjIURge6RX9yneDUBPB+DA9PdG"}]},"_from":"./","_npmVersion":"1.3.21","_npmUser":{"name":"ricardo.rossi","email":"rrossi@endata.com"},"maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}]}},"readme":"#Mockable\r\n> A quick and dirty way to mock APIs\r\n\r\n[![NPM](https://nodei.co/npm/mockable.png?downloads=true)](https://nodei.co/npm/mockable/)  \r\n[![NPM version](https://badge.fury.io/js/mockable.svg)](http://badge.fury.io/js/mockable)\r\n[![dependencies](https://david-dm.org/ricardo-rossi/mockable.png)](https://david-dm.org/ricardo-rossi/mockable)\r\n[![Travis](https://travis-ci.org/ricardo-rossi/Mockable.svg?branch=master)](https://travis-ci.org/ricardo-rossi/Mockable)\r\n\r\n### Overview\r\n\r\nIf you often work on client-side code and need a quick way to simulate a server API, then Mockable is for you. \r\nMockable has its own HTTP server, can work via either a CLI interface or embedded in other modules, and supports \r\nany HTTP method with zero configuration. It should have you mocking APIs in no time. Use it and let me know \r\nif it's missing anything else you need ;)\r\n\r\n### Features\r\n\r\n  * Easily simulates any server APIs by simply placing mocked responses into simple files\r\n  * Supports any standard HTTP method (e.g., *GET*, *PUT*, *POST*, *DELETE*, etc)\r\n  * Understands [RESTful APIs](http://stackoverflow.com/questions/671118/what-exactly-is-restful-programming)\r\n  * Comes with a built-in web server (using [node-static](https://github.com/cloudhead/node-static))\r\n  * Zero configuration: Mock new APIs without restarting Mockable\r\n  * Supports JSON, XML, or whatever else you want to use \r\n\r\n\r\n### Prerequisites\r\n\r\nBefore you use Mockable, you need [Node.js](http://nodejs.org/) and [npm](https://www.npmjs.org/). \r\nPlease see [How to install Node.js and npm](http://blog.nodeknockout.com/post/65463770933/how-to-install-node-js-and-npm)\r\n\r\n\r\n### Installation\r\n\r\nThe preferred installation method is using the -g (global) flag  \r\n```\r\n$ npm install -g mockable\r\n```\r\n\r\n### Running Mockable\r\n\r\n#### CLI Option   \r\nAfter you install Mockable globally (as shown above) you can run it from your terminal like this:\r\n\r\nServe up the current directory   \r\n```\r\n$ mockable\r\nserving \".\" at http://127.0.0.1:9081\r\n```\r\n\r\nServe up using port 9082  \r\n```\r\n$ mockable -p 9082\r\nserving \".\" at http://127.0.0.1:9082\r\n```\r\n\r\nServe up a different directory   \r\n```\r\n$ mockable public\r\nserving \"public\" at http://127.0.0.1:9081\r\n```\r\n\r\nSpecify additional headers (this one is useful for development)   \r\n```\r\n$ mockable -H '{\"Cache-Control\": \"no-cache, must-revalidate\"}'\r\nserving \".\" at http://127.0.0.1:9081\r\n```\r\n\r\nSet cache control max age   \r\n```\r\n$ mockable -c 7200\r\nserving \".\" at http://127.0.0.1:9081\r\n```\r\n\r\nShow help message, including all options   \r\n```\r\n$ mockable -h\r\n```\r\n#### Embedded Option  \r\n\r\nAlternatively, you can install Mockable locally.\r\n\r\n```\r\n$ npm install mockable\r\n```\r\n\r\nAnd then use it from within your own Node.js modules as shown:\r\n\r\n```\r\nvar mockable = require('mockable');\r\nvar server = new mockable.Server(9082, '.');\r\nserver.run();\r\n```\r\n\r\n### Mocking APIs\r\n\r\nMocking APIs with Mockable is easy. Just follow this simple rule:\r\n\r\n\r\nTo Mock this:  \r\n```\r\nA request to /A/B/C using 'HTTP_METHOD_NAME'\r\n```\r\n\r\nDo this: Create the following directory structure under your 'served' directory:  \r\n```\r\nA\r\n└── B\r\n```\r\nThen create a file names HTTP_METHOD_NAME.C.json and mock some JSON in it. \r\n(Replace HTTP_METHOD_NAME with the corresponding GET, POST, PUT, DELETE, etc.)\r\n```\r\nA\r\n└── B\r\n    └── HTTP_METHOD_NAME.C.json\r\n```\r\n\r\n### Some Examples\r\n\r\n#### Mocking GET /api/users/123 \r\n\r\nTo Mock the following API request:\r\n```\r\nGET /api/users/123\r\n```\r\nCreate a file with some mocked JSON such as:\r\n```\r\n{\r\n    \"name\": \"Ricardo Rossi\"\r\n}\r\n```\r\nAnd save it as GET.123.json under this directory structure:\r\n```\r\napi\r\n└── users\r\n    └── GET.123.json\r\n```\r\nRun Mockable and test the API:\r\n```\r\n$ curl --request GET 'http://127.0.0.1:9081/api/users/123'\r\n{\r\n    \"name\": \"Ricardo Rossi\"\r\n}\r\n```\r\n \r\n#### Mocking PUT /api/users/123 \r\n\r\nSame as above except name the file PUT.123.json instead\r\n\r\n#### Mocking DELETE /api/users/123 \r\n\r\nSame as above except name the file DELETE.123.json instead\r\n\r\n#### Mocking GET /api/users \r\n\r\nTo Mock the following API request:\r\n```\r\nGET /api/users\r\n```\r\nCreate a file with some mocked JSON such as:\r\n```\r\n[\r\n    {\r\n        \"name\": \"Ricardo Rossi\"\r\n    },\r\n    {\r\n        \"name\": \"John Doe\"\r\n    },\r\n    {\r\n        \"name\": \"Foo Bar\"\r\n    }\r\n]\r\n```\r\nAnd save it as GET.index.json under this directory structure:\r\n```\r\napi\r\n└── users\r\n    └── GET.index.json\r\n```\r\nRun Mockable and test the API:\r\n```\r\n$ curl --request GET 'http://127.0.0.1:9081/api/users'\r\n[\r\n    {\r\n        \"name\": \"Ricardo Rossi\"\r\n    },\r\n    {\r\n        \"name\": \"John Doe\"\r\n    },\r\n    {\r\n        \"name\": \"Foo Bar\"\r\n    }\r\n]\r\n```\r\n\r\n#### Mocking POST /api/users\r\n\r\nSame as above except name the file POST.index.json instead\r\n\r\n### Feedback\r\n\r\nFound an issue? [Enter it here](https://github.com/ricardo-rossi/Mockable/issues) or fix \r\nit using a [Pull Request](https://github.com/ricardo-rossi/Mockable/pulls)\r\n\r\n### Contributors\r\n\r\n * Author: [Ricardo Rossi](https://github.com/ricardo-rossi)\r\n * Contributors: [Jim Lavin](https://github.com/lavinjj)\r\n\r\n### License\r\n\r\n  Mockable is open-source software licensed under the [MIT license](LICENSE)\r\n  \r\n","maintainers":[{"name":"ricardo.rossi","email":"rrossi@endata.com"}],"time":{"modified":"2022-06-20T02:15:44.268Z","created":"2014-07-22T21:45:49.110Z","0.0.1":"2014-07-22T21:45:49.110Z","1.0.0":"2014-07-22T21:59:26.147Z","1.0.1":"2014-07-23T16:38:09.552Z","1.0.2":"2014-07-23T18:48:25.545Z","1.0.3":"2014-07-23T19:12:11.825Z","1.0.4":"2014-07-23T19:23:06.888Z","1.0.5":"2014-07-23T19:59:34.465Z","1.0.6":"2014-07-23T20:06:18.788Z","1.0.7":"2014-07-23T20:13:59.747Z","1.0.8":"2014-07-23T21:22:03.001Z","1.0.9":"2014-07-23T21:35:26.561Z","1.0.10":"2014-07-28T15:28:17.124Z"},"homepage":"https://github.com/ricardo-rossi/Mockable","keywords":["http","api","mock","server","rest","restful","json","GET","POST","PUT","DELETE","PATCH"],"repository":{"type":"git","url":"https://github.com/ricardo-rossi/Mockable"},"contributors":[{"name":"Jim Lavin","email":"jlavin@jimlavin.net"}],"author":{"name":"Ricardo Rossi","email":"rrossi@endata.com"},"bugs":{"url":"https://github.com/ricardo-rossi/Mockable/issues"},"license":"MIT","readmeFilename":"README.md","users":{"ricardo.rossi":true}}