RenderGatewayOptions: {
    authentication?: AuthenticationOptions;
    cloudOptions?: ServerOptions["integrations"];
    defaultRenderErrorResponse?: string;
    host: string;
    keepAliveTimeout?: number;
    name: string;
    port: number;
    renderEnvironment: IRenderEnvironment;
    uncaughtRenderErrorHandler?: CustomErrorHandlerFn;
}

Options for configuring the gateway.

Type declaration

  • Optional Readonly authentication?: AuthenticationOptions

    Options to indicate how to authenticate incoming render requests.

  • Optional Readonly cloudOptions?: ServerOptions["integrations"]

    Specify which cloud facilities we want.

  • Optional Readonly defaultRenderErrorResponse?: string

    A string that will be used to build an error response for a failed render if all other error handling options fail.

    If the sequence ${error} appears in the string, it will be replaced with the JSONified error information. If it does not appear, the JSONified error information will be omitted (useful if you don't want to include that for users).

  • Readonly host: string

    The hostname to which the gateway service should bind.

  • Optional Readonly keepAliveTimeout?: number

    Optional value in milliseconds for keepalive timeout of the server. For running in Google Cloud, this should be higher than the load balancer's own keepalive timeout value, which at time of writing was indicated to be 80000ms [1].

    [1] https://khanacademy.slack.com/archives/CJSE4TMQX/p1573252787333500

    Defaults to 90000.

  • Readonly name: string

    The name of the gateway service.

  • Readonly port: number

    The port on which the gateway service will listen.

  • Readonly renderEnvironment: IRenderEnvironment

    The environment that will handle rendering.

  • Optional Readonly uncaughtRenderErrorHandler?: CustomErrorHandlerFn

    Handler that will be invoked if a render request causes an exception.

    This provides the running server with an opportunity to override the default uncaught error response and provide a more friendly message.

Generated using TypeDoc