|
|
@ -6,7 +6,7 @@ const path = require('path') |
|
|
|
* @example |
|
|
|
* const LocalWebServer = require('local-web-server') |
|
|
|
* const localWebServer = new LocalWebServer() |
|
|
|
* const server = localWebServer.create({ |
|
|
|
* const server = localWebServer.listen({ |
|
|
|
* port: port, |
|
|
|
* directory: 'src' |
|
|
|
* }) |
|
|
@ -36,7 +36,7 @@ class LocalWebServer extends Lws { |
|
|
|
* @param [options.moduleDir] {string[]} - One or more directories to search for feature modules. |
|
|
|
* @returns {Server} |
|
|
|
*/ |
|
|
|
create (options) { |
|
|
|
listen (options) { |
|
|
|
const usage = require('lws/lib/usage') |
|
|
|
usage.defaults |
|
|
|
.set('an', 'ws') |
|
|
@ -47,7 +47,7 @@ class LocalWebServer extends Lws { |
|
|
|
modulePrefix: 'lws-', |
|
|
|
stack: require('./default-stack') |
|
|
|
}, options) |
|
|
|
return super.create(options) |
|
|
|
return super.listen(options) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|