diff --git a/package.json b/package.json index 0f6b222..d15810b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "interfake", "preferGlobal": true, - "version": "1.6.1", + "version": "1.6.2", "author": "Daniel Hough ", "description": "A simple way to create dummy APIs", "contributors": [ diff --git a/readme.md b/readme.md index 6d9a833..f97d5b9 100644 --- a/readme.md +++ b/readme.md @@ -152,7 +152,7 @@ interfake.listen(3000); // The server will listen on port 3000 * `request` * `response` * `afterResponse` (optional) -* `#listen(port)`: Takes a port and starts the server +* `#listen(port, callback)`: Takes a port and starts the server, and a callback which executes when the server is running * `#stop()`: Stops the server if it's been started * `#serveStatic(path, directory)`: Serve static (usually a website) files from a certain path. This is useful for testing [SPAs](http://en.wikipedia.org/wiki/Single-page_application). ([Example use.](/examples-javascript/fluent-web-page-test.js)) @@ -299,6 +299,7 @@ I tested this on my Mac. If you have trouble on Windows or any other platform, [ ## Version History +* 1.6.2: Can add a callback to `listen` so that you know when the server has started (by [bruce-one](https://github.com/bruce-one)) * 1.6.1: Upgraded to Express 4.0.0 (thanks to [Sebastian Schürmann](https://github.com/sebs)). * 1.6.0: Custom response headers (thanks to [Sebastian Schürmann](https://github.com/sebs)). * 1.5.0: Can now use query strings (thanks to [rajit](https://github.com/rajit)). Massive.