Interface Options

Options accepted by apiker.init().

interface Options {
    adminPanel?: boolean;
    authRoutes?: boolean;
    controllers?: Controllers;
    ctx?: any;
    debug?: boolean;
    email?: EmailOptions;
    env?: any;
    exports?: any;
    firewall?: boolean | Firewall;
    name?: string;
    objectStateMapping?: ObjectStateMapping;
    objectVersion?: string;
    objects?: string[];
    requestParams?: RequestParams;
    routes?: Routes;
    scheduled?: ((params) => Promise<void>);
}

Properties

adminPanel?: boolean

Enable the built-in admin panel routes (/admp*). Defaults to false.

authRoutes?: boolean

Enable the built-in /auth/* routes. Defaults to false.

controllers?: Controllers

Controller classes referenced by string routes.

ctx?: any

Worker execution context (set per request).

debug?: boolean

Enable verbose logging and pretty-printed JSON responses.

email?: EmailOptions

Transactional email configuration.

env?: any

Worker environment bindings (set per request).

exports?: any

The Worker's exports object; Apiker attaches handlers and DO classes to it.

firewall?: boolean | Firewall

Enable the request firewall; true for defaults or an object to configure it.

name?: string

Application name. Defaults to "Apiker".

objectStateMapping?: ObjectStateMapping

Per-object rule for deriving the Durable Object instance id.

objectVersion?: string

Durable Object schema version tag.

objects?: string[]

Durable Object class names to generate and export.

requestParams?: RequestParams

Current request context (set per request).

routes?: Routes

Route pattern → handler function or "Controller.method" string.

scheduled?: ((params) => Promise<void>)

Handler invoked on scheduled (cron) events.

Type declaration

    • (params): Promise<void>
    • Handler invoked on scheduled (cron) events.

      Parameters

      Returns Promise<void>

Generated using TypeDoc