From 7a27ef0768492e1964924e36a502f8695b958193 Mon Sep 17 00:00:00 2001 From: Lloyd Brookes Date: Thu, 19 Nov 2015 10:17:02 +0000 Subject: [PATCH] docs --- README.md | 6 +++--- lib/local-web-server.js | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 33ce800..45c1c4e 100644 --- a/README.md +++ b/README.md @@ -222,12 +222,12 @@ serving at http://localhost:8100 * [local-web-server](#module_local-web-server) - * [localWebServer([options])](#exp_module_local-web-server--localWebServer) ⏏ + * [localWebServer([options])](#exp_module_local-web-server--localWebServer) ⇒ [KoaApplication](https://github.com/koajs/koa/blob/master/docs/api/index.md#application) ⏏ * [~rewriteRule](#module_local-web-server--localWebServer..rewriteRule) -### localWebServer([options]) ⏏ -Returns a Koa application +### localWebServer([options]) ⇒ [KoaApplication](https://github.com/koajs/koa/blob/master/docs/api/index.md#application) ⏏ +Returns a Koa application you can launch or mix into an existing app. **Kind**: Exported function **Params** diff --git a/lib/local-web-server.js b/lib/local-web-server.js index f23a247..285888a 100644 --- a/lib/local-web-server.js +++ b/lib/local-web-server.js @@ -14,7 +14,7 @@ const pathToRegexp = require('path-to-regexp') module.exports = localWebServer /** - * Returns a Koa application + * Returns a Koa application you can launch or mix into an existing app. * * @param [options] {object} - options * @param [options.static] {object} - koa-static config @@ -34,6 +34,7 @@ module.exports = localWebServer * @param [options.verbose] {boolean} - Print detailed output, useful for debugging * * @alias module:local-web-server + * @return {external:KoaApplication} * @example * const localWebServer = require('local-web-server') * localWebServer().listen(8000) @@ -240,3 +241,8 @@ process.on('unhandledRejection', (reason, p) => { * @property from {string} - request route * @property to {string} - target route */ + +/** + * @external KoaApplication + * @see https://github.com/koajs/koa/blob/master/docs/api/index.md#application + */