HTTP_OPTIONS
Frozen defaults used by the HTTP and HTTPS server constructors.
Explain it like I’m five
The simple mental model
HTTP_OPTIONS is Redweb’s starter checklist for HTTP servers: port, bind address, public folders, encoding, and related defaults.
When should I use it?
Consult it when you need to know what omitted HttpServer options mean or when generating configuration documentation.
Follow the example
This pattern explains the named API. Application classes, credentials, and assets may need to be supplied; use a complete recipe for a runnable starting point.
const { HTTP_OPTIONS } = require('redweb')
// port 80, bind 0.0.0.0, publicPaths ['./public'],
// listen true, encoding 'json', and safe error exposure disabled- 1
The server copies its baseline HTTP choices.
- 2
Your provided values are validated and merged.
- 3
The completed configuration drives app creation and optional listener startup.
Methods and members
Server defaults
port, bind, listen, ssl, logger, and static public paths.
Application defaults
services, encoding, CORS, and safe error exposure.