rest-vir - v1.0.0
    Preparing search index...

    Type Alias StartServiceOutput

    Output of startService.

    type StartServiceOutput = {
        cluster?: ClusterManager;
        host: string;
        kill: () => void;
        port: number;
        server?: FastifyInstance;
        worker?: WorkerRunner;
    }
    Index

    Properties

    cluster?: ClusterManager

    The ClusterManager for all the spawned server workers. This is populated when the server is run with a multiple threads (when options.workerCount > 1). It will only be populated for the primary thread.

    host: string

    The host that the server was attached to. (This is simply passed directly from the user options, merged with the default.)

    kill: () => void

    A function that will kill the service even if it's using multiple workers.

    port: number

    The port that the server actually started on. This depends on the options given to startService.

    server?: FastifyInstance

    The instantiated and running fastify instance. This is populated when the server is run on only a single thread (when options.workerCount is 1).

    worker?: WorkerRunner

    The WorkerRunner for the current worker. This is populated when the server is run with a multiple threads (when options.workerCount > 1). It will only be populated for non-primary threads.