@gibme/webserver
    Preparing search index...

    Type Alias Options

    type Options = {
        autoContentSecurityPolicyHeaders: boolean;
        autoHandle404: boolean;
        autoHandleOptions: boolean;
        autoParseJSON: boolean;
        autoParseRaw: boolean;
        autoParseText: boolean;
        autoParseURLEncoded: boolean;
        autoParseXML: boolean;
        autoRecommendedHeaders: boolean;
        autoStartCloudflared: boolean;
        backlog: number;
        bodyLimit: number;
        compression: boolean;
        corsOrigin: string;
        helmet: HelmetOptions | boolean;
        host: string;
        logging: boolean | "full" | ((entry: LogEntry) => Promise<void> | void);
        port: number;
        sessions: expressSession.SessionOptions | boolean;
        ssl: false | { certificate: string | Buffer; privateKey: string | Buffer };
        suppressProcessErrors: boolean;
        wsOptions: WebSocket.ServerOptions;
        xml: {
            parserOptions?: XMLParserOptions;
            validatorOptions?: XMLValidatorOptions;
        };
    }
    Index

    Properties

    autoContentSecurityPolicyHeaders: boolean

    Whether we enable the content security policy header by default

    false
    
    autoHandle404: boolean

    Whether we should auto handle 404s

    true
    
    autoHandleOptions: boolean

    Whether we should auto handle options

    true
    
    autoParseJSON: boolean

    Whether we will automatically parse JSON request bodies

    true
    
    autoParseRaw: boolean

    Whether we will automatically parse RAW request bodies

    true
    
    autoParseText: boolean

    Whether we will automatically parse Text request bodies

    true
    
    autoParseURLEncoded: boolean

    Whether we will automatically parse URLEncoded request bodies

    true
    
    autoParseXML: boolean

    Whether we will automatically parse XML request bodies

    true
    
    autoRecommendedHeaders: boolean

    Whether we should return the default list of recommended headers with every request

    true
    
    autoStartCloudflared: boolean

    Whether to automatically start cloudflared tunnel

    false
    
    backlog: number

    TCP backlog for the underlying server

    511
    
    bodyLimit: number

    Body size limit in MB

    2
    
    compression: boolean

    Whether compression should be enabled by default

    true
    
    corsOrigin: string

    The CORS domain name to report in requests

    * (all)
    
    helmet: HelmetOptions | boolean

    Helmet module options

    false
    
    host: string

    The host address to bind to

    0.0.0.0 (all)
    
    logging: boolean | "full" | ((entry: LogEntry) => Promise<void> | void)

    Defines how request logging is handled.

    For true: High level information of each Request will be logged as debug to the console/file For full: Headers and the Request body (if POST/PATCH/PUT) are also provided in the log entry For callback: Full log entries are provided to the specified callback method, and the entry will not be passed to the standard logging facility.

    false
    
    port: number

    The bind port for the server

    443 if ssl, 80 if non-ssl
    
    sessions: expressSession.SessionOptions | boolean

    Whether we enable session support

    Note: At a minimum, a secret must be supplied if options are specified

    false
    
    ssl: false | { certificate: string | Buffer; privateKey: string | Buffer }

    Whether SSL should be enabled

    Type declaration

    • false
    • { certificate: string | Buffer; privateKey: string | Buffer }
      • certificate: string | Buffer

        The SSL certificate file and/or data.

        Note: If a string is specified, a full path is expected

      • privateKey: string | Buffer

        The SSL private key file and/or data

        Note: If a string is specified, a full path is expected

    false
    
    suppressProcessErrors: boolean

    If set to true, allows node to crash via thrown exceptions If set to false (or unset), thrown exceptions are swallowed and logged automatically

    true
    
    wsOptions: WebSocket.ServerOptions

    WebSocket server options

    xml: {
        parserOptions?: XMLParserOptions;
        validatorOptions?: XMLValidatorOptions;
    }

    Automatic XML body parser handling options