Browse Source

docs

master
Lloyd Brookes 9 years ago
parent
commit
7a27ef0768
  1. 6
      README.md
  2. 8
      lib/local-web-server.js

6
README.md

@ -222,12 +222,12 @@ serving at http://localhost:8100
* [local-web-server](#module_local-web-server) * [local-web-server](#module_local-web-server)
* [localWebServer([options])](#exp_module_local-web-server--localWebServer) ⏏
* [localWebServer([options])](#exp_module_local-web-server--localWebServer) <code>[KoaApplication](https://github.com/koajs/koa/blob/master/docs/api/index.md#application)</code>
* [~rewriteRule](#module_local-web-server--localWebServer..rewriteRule) * [~rewriteRule](#module_local-web-server--localWebServer..rewriteRule)
<a name="exp_module_local-web-server--localWebServer"></a> <a name="exp_module_local-web-server--localWebServer"></a>
### localWebServer([options]) ⏏
Returns a Koa application
### localWebServer([options]) <code>[KoaApplication](https://github.com/koajs/koa/blob/master/docs/api/index.md#application)</code>
Returns a Koa application you can launch or mix into an existing app.
**Kind**: Exported function **Kind**: Exported function
**Params** **Params**

8
lib/local-web-server.js

@ -14,7 +14,7 @@ const pathToRegexp = require('path-to-regexp')
module.exports = localWebServer 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] {object} - options
* @param [options.static] {object} - koa-static config * @param [options.static] {object} - koa-static config
@ -34,6 +34,7 @@ module.exports = localWebServer
* @param [options.verbose] {boolean} - Print detailed output, useful for debugging * @param [options.verbose] {boolean} - Print detailed output, useful for debugging
* *
* @alias module:local-web-server * @alias module:local-web-server
* @return {external:KoaApplication}
* @example * @example
* const localWebServer = require('local-web-server') * const localWebServer = require('local-web-server')
* localWebServer().listen(8000) * localWebServer().listen(8000)
@ -240,3 +241,8 @@ process.on('unhandledRejection', (reason, p) => {
* @property from {string} - request route * @property from {string} - request route
* @property to {string} - target route * @property to {string} - target route
*/ */
/**
* @external KoaApplication
* @see https://github.com/koajs/koa/blob/master/docs/api/index.md#application
*/
Loading…
Cancel
Save