Cell API
    Preparing search index...

    Interface ApplicationHost

    A process that runs the application in-process: cell dev (one port with Vite) and tests. When a host is set, entries hand over their request handler with started instead of listening.

    interface ApplicationHost {
        server?: unknown;
        beforeStart?(): Promise<void>;
        failed(error: unknown): void;
        started(application: StartedApplication): void;
    }
    Index
    server?: unknown

    The HTTP server requests come from; passed to ServerAware components (WebSocket and the like).

    • Called once the DI container is loaded, before the application starts; the application starts when the returned promise resolves. Cloudflare Workers allow code generation (new Function) only while modules load and I/O only while a request is handled, so the worker loads the modules at startup and starts the application on the first request.

      Returns Promise<void>