Interface FrameworkOptions

interface FrameworkOptions {
    auth?: RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>, any>[];
    bodyParser?: {
        json?: OptionsJson;
        urlencoded?: OptionsUrlencoded;
    };
    cookieParser?: {
        options?: CookieParseOptions;
        secret?: string | string[];
    };
    cors?: boolean | CorsOptions | CorsOptionsDelegate<CorsRequest>;
    middlewares?: RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[];
    validatorOnError?: ErrorRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>, any>;
    validators?: RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>, any>[];
}

Hierarchy

  • FrameworkOptions
    • FrameworkOptions

Properties

auth?: RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>, any>[]
bodyParser?: {
    json?: OptionsJson;
    urlencoded?: OptionsUrlencoded;
}
cookieParser?: {
    options?: CookieParseOptions;
    secret?: string | string[];
}
cors?: boolean | CorsOptions | CorsOptionsDelegate<CorsRequest>
middlewares?: RequestHandlerParams<ParamsDictionary, any, any, ParsedQs, Record<string, any>>[]
validatorOnError?: ErrorRequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>, any>

Error request handler for the default validator if no validitor was set in constructor

validators?: RequestHandler<ParamsDictionary, any, any, ParsedQs, Record<string, any>, any>[]