Type Alias APIConfig

APIConfig: {
    caseConversion?: {
        in: "snake" | "camel";
        out: "snake" | "camel";
    };
    client?: PgClientParams;
    pagination?: {
        defaultLimit?: number;
        defaultPage?: number;
    };
    port?: number;
    prefix?: `/${string}`;
    tokenHeader?: string;
}

Type declaration

  • OptionalcaseConversion?: {
        in: "snake" | "camel";
        out: "snake" | "camel";
    }

    The case conversion to use for the API

    { in: 'snake', out: 'camel' }
    
    • in: "snake" | "camel"
    • out: "snake" | "camel"
  • Optionalclient?: PgClientParams
  • Optionalpagination?: {
        defaultLimit?: number;
        defaultPage?: number;
    }

    The pagination to use for the API

    { defaultPage: 1, defaultLimit: 10 }
    
    • OptionaldefaultLimit?: number
    • OptionaldefaultPage?: number
  • Optionalport?: number

    The port to run the API on

  • Optionalprefix?: `/${string}`

    The prefix to use for the API

    '/api'
    
    '/api'
    
  • OptionaltokenHeader?: string

    The header to use for the API

    'Authorization'
    
    'Authorization'