This commit is contained in:
Lloyd Brookes
2015-11-15 21:15:25 +00:00
parent 01ba3676e5
commit d52dc38a91
6 changed files with 262 additions and 116 deletions

View File

@ -18,7 +18,7 @@ module.exports = {
},
{
name: 'no-cache', alias: 'n', type: Boolean,
description: 'Disable etag-based caching.', group: 'server'
description: 'Disable etag-based caching - forces loading from disk each request.', group: 'server'
},
{
name: 'help', alias: 'h', type: Boolean,

View File

@ -21,9 +21,18 @@ const send = require('koa-send')
/**
* @module local-web-server
*/
module.exports = getApp
module.exports = localWebServer
function getApp (options) {
/**
* Returns a Koa application
*
* @param [options] {object} - options
* @param [options.blacklist] {regexp[]} - a list of forbidden routes.
* @alias module:local-web-server
* @example
* const localWebServer = require('local-web-server')
*/
function localWebServer (options) {
options = Object.assign({
static: {},
serveIndex: {},