• Type Parameters

    Parameters

    • Optional arg: T

    Returns T

    Remarks

    Global port to application builder

    Example

    Bootstrapping a service

    void bootstrap(async (): Promise<void> => {
    // Seed the stores (this should be done by CI/CD pipelines)
    // Register artifacts, build the app
    const express = app(new ExpressApp())
    .with(Room)
    .with(Hotel, {
    projector: {
    store: PostgresProjectorStore("hotel"),
    indexes: [{ type: "asc" }]
    }
    })
    .with(Next30Days, {
    projector: { store: PostgresProjectorStore("next30"), indexes: [{}] }
    })
    .build();

    // To seed the stores (CI/CD)
    await seed();

    // Start listing to incoming messages
    await app().listen();
    });

Generated using TypeDoc