intellibrix v1.0.0
    Preparing search index...

    Interface ExpressBrickOptionsNamespace

    Interface for the options of ExpressBrick. It extends from BrickOptions and adds properties specific to ExpressBrick.

    interface ExpressBrickOptions {
        builtinMiddleware?: { json: boolean; urlencoded: boolean };
        database?: KeyValueStore;
        host?: string;
        id?: string;
        intelligence?: Intelligence;
        logJSON?: boolean;
        logLevel?: Level;
        middleware?: RequestHandler<
            ParamsDictionary,
            any,
            any,
            ParsedQs,
            Record<string, any>,
        >[];
        name?: string;
        pinoOptions?: LoggerOptions<never>;
        port?: number;
        routes?: {
            handler: (req: Request, res: Response) => void;
            method: string;
            path: string;
        }[];
        structure?: Structure;
    }

    Hierarchy

    • BrickOptions
      • ExpressBrickOptions
    Index
    builtinMiddleware?: { json: boolean; urlencoded: boolean }

    An object specifying whether to use built-in middleware functions.

    Type Declaration

    • json: boolean

      Whether to use the built-in JSON middleware.

    • urlencoded: boolean

      Whether to use the built-in URL-encoded middleware.

    database?: KeyValueStore

    The key-value store of the Brick instance. Defaults to an in-memory store.

    host?: string

    The host on which the Express server will listen.

    id?: string

    The unique identifier of the Brick instance. If not provided, a random UUID will be generated.

    intelligence?: Intelligence

    The Intelligence of the Brick instance. This is used to manage the AI capabilities of the Brick.

    logJSON?: boolean

    A boolean indicating whether the logs should be in JSON format.

    logLevel?: Level

    The log level of the Brick instance. This determines the level of detail of the logs.

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

    An array of middleware functions to use in the Express application.

    name?: string

    The name of the Brick instance. If not provided, the id will be used as the name.

    pinoOptions?: LoggerOptions<never>

    The options for the pino logger used by the Brick instance.

    port?: number

    The port on which the Express server will listen.

    routes?: {
        handler: (req: Request, res: Response) => void;
        method: string;
        path: string;
    }[]

    An array of routes that the Express server will handle.

    Type Declaration

    • handler: (req: Request, res: Response) => void

      The handler function to execute when the route is hit.

    • method: string

      The HTTP method for the route.

    • path: string

      The path for the route.

    structure?: Structure

    The parent Structure of the Brick, if any.