config.md
August 29, 2024 · View on GitHub
lws-config
The lws configuration options.
- lws-config
- LwsConfig ⏏
- .port :
number - .hostname :
string - .maxConnections :
number - .keepAliveTimeout :
number - .configFile :
string - .https :
boolean - .http2 :
boolean - .key :
string - .cert :
string - .pfx :
string - .ciphers :
string - .secureProtocol :
string - .stack :
Array.<string>|Array.<MiddlewarePlugin> - .moduleDir :
string|Array.<string> - .view :
string - .title :
string
- .port :
- LwsConfig ⏏
LwsConfig ⏏
lwsConfig.port : number
The port number to listen on.
Kind: instance property of LwsConfig
Default: 8000
lwsConfig.hostname : string
The hostname or IP address to bind to.
Kind: instance property of LwsConfig
Default: "0.0.0.0"
lwsConfig.maxConnections : number
Kind: instance property of LwsConfig
Default:
lwsConfig.keepAliveTimeout : number
Kind: instance property of LwsConfig
Default: 5000
lwsConfig.configFile : string
Filename to retrieve stored config from. Defaults to the first found of "lws.config.js", "lws.config.mjs" or "lws.config.cjs". Config files with the .js extension must always be a CommonJS module.
Kind: instance property of LwsConfig
lwsConfig.https : boolean
Enable HTTPS using a built-in TLS certificate registered to the hosts 127.0.0.1 and localhost.
Kind: instance property of LwsConfig
Default: false
lwsConfig.http2 : boolean
Enable HTTP2 using a built-in TLS certificate registered to the hosts 127.0.0.1 and localhost.
Kind: instance property of LwsConfig
Default: false
lwsConfig.key : string
Private key. Supply along with cert to launch a secure server.
Kind: instance property of LwsConfig
lwsConfig.cert : string
Certificate chain. Supply along with key to launch a secure server.
Kind: instance property of LwsConfig
lwsConfig.pfx : string
Optional PFX or PKCS12 encoded private key and certificate chain. An alternative to providing key and cert.
Kind: instance property of LwsConfig
lwsConfig.ciphers : string
Optional cipher suite specification, replacing the built-in default.
Kind: instance property of LwsConfig
lwsConfig.secureProtocol : string
Optional SSL method to use.
Kind: instance property of LwsConfig
lwsConfig.stack : Array.<string> | Array.<MiddlewarePlugin>
Array of middleware classes, or filenames of modules exporting a middleware class.
Kind: instance property of LwsConfig
lwsConfig.moduleDir : string | Array.<string>
One or more directories to search for middleware modules.
Kind: instance property of LwsConfig
Default: "["."]"
lwsConfig.view : string
Custom view instance.
Kind: instance property of LwsConfig
Default: null
lwsConfig.title : string
Give the process a more useful title than the default node. This helps to find your server in utilities like ps, Task Manager, Activity Monitor etc.
Kind: instance property of LwsConfig
Default: null