Comparing version 1.0.0-pre3.1 to 1.0.0-pre4.0
@@ -269,3 +269,3 @@ 'use strict' | ||
const server = lws.create(options) | ||
const server = lws.listen(options) | ||
return server | ||
@@ -272,0 +272,0 @@ } |
@@ -21,14 +21,22 @@ /** | ||
/** | ||
* Create a listening 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. | ||
* @param [options.configFile] {string} - Config file, defaults to 'lws.config.js'. | ||
* @param [options.stack] {string[]|Features[]} - Array of feature classes, or filenames of modules exporting a feature class. | ||
* @param [options.maxConnections] {number} - The maximum number of concurrent connections supported by the server. | ||
* @param [options.keepAliveTimeout] {number} - The period (in milliseconds) of inactivity a connection will remain open before being destroyed. Set to `0` to keep connections open indefinitely. | ||
* @param [options.configFile] {string} - Config file path, defaults to 'lws.config.js'. | ||
* @param [options.https] {boolean} - Enable HTTPS using a built-in key and cert registered to the domain 127.0.0.1. | ||
* @param [options.key] {string} - SSL key file path. Supply along with --cert to launch a https server. | ||
* @param [options.cert] {string} - SSL cert file path. Supply along with --key to launch a https server. | ||
* @param [options.pfx] {string} - Path to an PFX or PKCS12 encoded private key and certificate chain. An alternative to providing --key and --cert. | ||
* @param [options.ciphers] {string} - Optional cipher suite specification, replacing the default. | ||
* @param [options.secureProtocol] {string} - Optional SSL method to use, default is "SSLv23_method". | ||
* @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.https] {boolean} - Enable HTTPS using a built-in key and cert, registered to the domain 127.0.0.1. | ||
* @param [options.key] {string} - SSL key. Supply along with --cert to launch a https server. | ||
* @param [options.cert] {string} - SSL cert. Supply along with --key to launch a https server. | ||
* @returns {Server} | ||
*/ | ||
create (options) { | ||
listen (options) { | ||
options = options || {} | ||
@@ -35,0 +43,0 @@ options.stack = arrayify(options.stack) |
{ | ||
"name": "lws", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "1.0.0-pre3.1", | ||
"version": "1.0.0-pre4.0", | ||
"description": "The modular web server for productive full-stack development", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/lwsjs/lws.git", |
@@ -22,3 +22,3 @@ 'use strict' | ||
const lws = new Lws() | ||
const server = lws.create({ | ||
const server = lws.listen({ | ||
stack: [ One ], | ||
@@ -25,0 +25,0 @@ https: true, |
@@ -23,3 +23,3 @@ 'use strict' | ||
const lws = new Lws() | ||
const server = lws.create({ | ||
const server = lws.listen({ | ||
stack: [ One ], | ||
@@ -46,3 +46,3 @@ port: port | ||
const lws = new Lws() | ||
const server = lws.create({ | ||
const server = lws.listen({ | ||
stack: [ One ], | ||
@@ -82,3 +82,3 @@ port: port, | ||
const lws = new Lws() | ||
const server = lws.create({ | ||
const server = lws.listen({ | ||
websocket: One, | ||
@@ -85,0 +85,0 @@ port: port |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134592
1268