Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NestApplication

Hierarchy

Implements

  • any
  • any

Index

Constructors

constructor

Properties

Private appOptions

Private config

Protected container

container: NestContainer

Private httpAdapter

httpAdapter: HttpServer

Private httpServer

httpServer: any

Private injector

injector: Injector = new Injector()

Private isInitialized

isInitialized: boolean = false

Private logger

logger: any = new Logger(NestApplication.name, true)

Private microservices

microservices: any[] = []

Private microservicesModule

microservicesModule: any = MicroservicesModule? new MicroservicesModule(): null

Private middlewareContainer

middlewareContainer: MiddlewareContainer = new MiddlewareContainer()

Private middlewareModule

middlewareModule: MiddlewareModule = new MiddlewareModule()

Private routesResolver

routesResolver: Resolver

Private socketModule

socketModule: any = SocketModule ? new SocketModule() : null

Methods

applyOptions

  • applyOptions(): this

Protected callBootstrapHook

  • callBootstrapHook(): Promise<void>

Protected callDestroyHook

  • callDestroyHook(): Promise<void>

Protected callInitHook

  • callInitHook(): Promise<void>

Protected callShutdownHook

  • callShutdownHook(signal?: string): Promise<void>

close

  • close(): Promise<any>

connectMicroservice

createServer

  • createServer<T>(): T

enableCors

enableShutdownHooks

  • enableShutdownHooks(signals?: any[]): this

Protected find

  • find<TInput, TResult>(typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol): TResult

Protected findInstanceByPrototypeOrToken

  • findInstanceByPrototypeOrToken<TInput, TResult>(metatypeOrToken: Type<TInput> | Abstract<TInput> | string | symbol, contextModule: Partial<Module>): TResult

get

  • get<TInput, TResult>(typeOrToken: Type<TInput> | Abstract<TInput> | string | symbol, options?: object): TResult

getHttpAdapter

getHttpServer

  • getHttpServer(): any

getMicroservices

getUnderlyingHttpServer

  • getUnderlyingHttpServer<T>(): T

init

  • init(): Promise<this>

listen

  • listen(port: number | string, callback?: function): Promise<any>
  • listen(port: number | string, hostname: string, callback?: function): Promise<any>
  • Parameters

    • port: number | string
    • Optional callback: function
        • (): void
        • Returns void

    Returns Promise<any>

  • Parameters

    • port: number | string
    • hostname: string
    • Optional callback: function
        • (): void
        • Returns void

    Returns Promise<any>

listenAsync

  • listenAsync(port: number | string, hostname?: string): Promise<any>

Private listenToPromise

Protected listenToShutdownSignals

  • listenToShutdownSignals(signals: string[]): void

registerHttpServer

  • registerHttpServer(): void

Private registerMiddleware

  • registerMiddleware(instance: any): Promise<void>

registerModules

  • registerModules(): Promise<void>

registerParserMiddleware

  • registerParserMiddleware(): void

registerRouter

  • registerRouter(): Promise<void>

registerRouterHooks

  • registerRouterHooks(): Promise<void>

registerWsModule

  • registerWsModule(): void

select

selectContextModule

  • selectContextModule(): void

setBaseViewsDir

  • setBaseViewsDir(path: string | string[]): this

setGlobalPrefix

  • setGlobalPrefix(prefix: string): this

setViewEngine

  • setViewEngine(engineOrOptions: any): this

startAllMicroservices

  • startAllMicroservices(callback?: function): this

startAllMicroservicesAsync

  • startAllMicroservicesAsync(): Promise<void>

use

  • use(...args: [any, any]): this

useGlobalFilters

useGlobalGuards

useGlobalInterceptors

useGlobalPipes

useLogger

useStaticAssets

  • useStaticAssets(options: any): this
  • useStaticAssets(path: string, options?: any): this

useWebSocketAdapter

Generated using TypeDoc