{"repo":"sinedied/smoke","free":true,"listed":false,"github":"https://github.com/sinedied/smoke","clone":"git clone https://github.com/sinedied/smoke.git","description":":dash: Simple yet powerful file-based mock server with recording abilities","language":"JavaScript","stars":208,"topics":["mock","server","file-based","nodejs","api","json","rest","template","simple","hacktoberfest"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":":dash: smoke Simple yet powerful file-based mock server with recording abilities Just drop a bunch of (JSON) files in a folder and you're ready to go! Basic mock example 1. Start the server: smoke 2. Create a file named get api#hello.json : 3. Test the mock: curl http://localhost:3000/api/hello Features Smoke is a file-based, convention over configuration mock server that can fill your API mocking needs without any complex setup. Yet, it supports many advanced features and dynamic mocks for almost any situation: - Generate mocks quickly by recording responses from an existing server - Use folders and file names to describe API routes and REST methods - Use templates to generate responses based on input queries and route parameters - Add / edit / remove mocks without restarting the server - Generate mocks with JavaScript for more complex responses - Define different mock sets to simulate various scenarii (errors...), with fallback - Customize headers and status code if needed, automatically detect content-type if not specified - Add custom middlewares to modify requests/responses - Mock only specific requests and proxy the rest to an existing server - Supports CORS (cross-origin resource-sharing) Installation Usage See some example mocks to quickly get a grasp of the syntax and possibilities. CLI usage is quite straightforward you can just run smoke unless you want to add some options: File naming General format: methods api#route#@routeParam$queryParam=value. set.extension Th","default_branch":null,"files":null,"tree":[],"storefront":"/r/sinedied","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/sinedied/smoke/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}