@creator.co/wapi - v1.8.2
    Preparing search index...

    Type Alias RouterConfig

    RouterConfig: TransactionConfig & {
        containerSetupHook?: (
            server: HTTPServer,
            app: express.Express,
        ) => Promise<void>;
        cors?: {
            allowCredentials?: boolean;
            headers?: string[];
            origin?: string | string[];
        };
        healthCheckRoute?: string;
        port?: number;
        routes: AnyRoute[];
        timeout?: number;
    }

    Represents the configuration options for a router.

    Type declaration

    • OptionalcontainerSetupHook?: (server: HTTPServer, app: express.Express) => Promise<void>
    • Optionalcors?: { allowCredentials?: boolean; headers?: string[]; origin?: string | string[] }

      Configuration options for Cross-Origin Resource Sharing (CORS).

    • OptionalhealthCheckRoute?: string

      The route for the health check endpoint.

    • Optionalport?: number

      The port number for the server to listen on.

    • routes: AnyRoute[]

      An array of route objects representing the available routes in the application.

    • Optionaltimeout?: number

      Optional timeout value in milliseconds.