Skip to content

TypeScript API / @laikacms/server/embedded / EmbeddedLaika

Interface: EmbeddedLaika ​

Properties ​

assets ​

ts
assets: CatalogAssetsRepository;

Assets repository.


documents ​

ts
documents: CatalogDocumentsRepository;

Documents repository — use this in SSR routes to read/write content.


ensureReady ​

ts
ensureReady: () => Promise<void>;

Await this before accessing documents, storage, or assets directly (e.g. in SSR route handlers). Seeds config.yml if absent. Idempotent — safe to call multiple times; the seeding only runs once.

Returns ​

Promise<void>


fetch ​

ts
fetch: (request) => Promise<Response>;

Fetch handler — route all /basePath/* requests here.

Parameters ​

ParameterType
requestRequest

Returns ​

Promise<Response>


storage ​

ts
storage: FileSystemStorageRepository;

Raw storage repository (FileSystem).

Released under the MIT License.