node-cooper-fastify - v0.2.0
    Preparing search index...

    Variable cooperFastifyConst

    cooperFastify: (
        fastify: FastifyInstance<
            RawServerDefault,
            IncomingMessage,
            ServerResponse<IncomingMessage>,
            FastifyBaseLogger,
            FastifyTypeProviderDefault,
        >,
        options: Record<string, unknown>,
    ) => Promise<void> = ...

    Type Declaration

      • (
            fastify: FastifyInstance<
                RawServerDefault,
                IncomingMessage,
                ServerResponse<IncomingMessage>,
                FastifyBaseLogger,
                FastifyTypeProviderDefault,
            >,
            options: Record<string, unknown>,
        ): Promise<void>
      • Loads the configuration and decorates the instance with config.

        Its options are cooper-config's load options. Given none, it reads a configuration already loaded -- by serverOptions(), the preload entry or the application -- and loads the defaults only when there is none. A document that does not load rejects, so ready() does and the server never starts.

        Parameters

        • fastify: FastifyInstance<
              RawServerDefault,
              IncomingMessage,
              ServerResponse<IncomingMessage>,
              FastifyBaseLogger,
              FastifyTypeProviderDefault,
          >
        • options: Record<string, unknown>

        Returns Promise<void>