Skip to content

ambiten


ambiten / core / AmbitenBootstrapFactory

Class: AmbitenBootstrapFactory

Defined in: packages/core/src/lib-core/bootstrap/ambitenBootstrap.ts:478

Factory class to create an instance of AmbitenBootstrap. This class encapsulates the logic for initializing the Ambiten application stack, including MongoDB, Multi-Tenancy, Redis, GraphQL logger etc. setup. It can be used to create a fully configured Ambiten instance with optional configuration parameters.

Example

ts
const Ambiten = await AmbitenBootstrapFactory.create();
const db = Ambiten.getMongoClient();
await db.connect();
const graphql = await Ambiten.getGraphQL();
// You can now use the GraphQL instance to generate schema or start a server
// or perform other GraphQL related operations
graphql.generateSchema();
Ambiten.getRedisClient();
// or with custom config
const Ambiten = await AmbitenBootstrapFactory.create(customConfig);

Param

config

Optional configuration object for Ambiten.

Constructors

Constructor

new AmbitenBootstrapFactory(): AmbitenBootstrapFactory

Returns

AmbitenBootstrapFactory

Methods

create()

static create(options?): Promise<AmbitenRuntime<Document>>

Defined in: packages/core/src/lib-core/bootstrap/ambitenBootstrap.ts:479

Parameters

options?

AmbitenBootstrapFactoryOptions = {}

Returns

Promise<AmbitenRuntime<Document>>

Context-aware execution infrastructure for multi-tenant systems.