readme, docs, deps
This commit is contained in:
@ -7,9 +7,13 @@ const path = require('path')
|
||||
* const LocalWebServer = require('local-web-server')
|
||||
* const localWebServer = new LocalWebServer()
|
||||
* const server = localWebServer.listen({
|
||||
* port: port,
|
||||
* directory: 'src'
|
||||
* port: 8050,
|
||||
* https: true,
|
||||
* directory: 'src',
|
||||
* spa: 'index.html',
|
||||
* websocket: 'src/websocket-server.js'
|
||||
* })
|
||||
* // secure, SPA server with listening websocket now ready on port 8050
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -17,7 +21,7 @@ const path = require('path')
|
||||
*/
|
||||
class LocalWebServer extends Lws {
|
||||
/**
|
||||
* Create a listening HTTP/HTTPS server.
|
||||
* Returns a listening HTTP/HTTPS server.
|
||||
* @param [options] {object} - Server options
|
||||
* @param [options.port] {number} - Port
|
||||
* @param [options.hostname] {string} -The hostname (or IP address) to listen on. Defaults to 0.0.0.0.
|
||||
@ -33,7 +37,7 @@ class LocalWebServer extends Lws {
|
||||
* @param [options.stack] {string[]|Middlewares[]} - Array of feature classes, or filenames of modules exporting a feature class.
|
||||
* @param [options.server] {string|ServerFactory} - Custom server factory, e.g. lws-http2.
|
||||
* @param [options.websocket] {string|Websocket} - Path to a websocket module
|
||||
* @param [options.moduleDir] {string[]} - One or more directories to search for feature modules.
|
||||
* @param [options.moduleDir] {string[]} - One or more directories to search for modules.
|
||||
* @returns {Server}
|
||||
*/
|
||||
listen (options) {
|
||||
|
Reference in New Issue
Block a user