跳到主要内容
版本:Next

Framework

Hierarchy

Index

Constructors

constructor

Properties

publicapp

readonlyapplicationContext

applicationContext: IMidwayContainer

configService

configService: MidwayConfigService

configurationOptions

configurationOptions: IMidwaySocketIOOptions

environmentService

environmentService: MidwayEnvironmentService

informationService

informationService: MidwayInformationService

loggerService

loggerService: MidwayLoggerService

middlewareService

middlewareService: MidwayMiddlewareService<Context, unknown, unknown>

mockService

mockService: MidwayMockService

Methods

applicationInitialize

  • applicationInitialize(): void

applyMiddleware

  • applyMiddleware<R, N>(lastMiddleware?: CommonMiddlewareUnion<Context, R, N>): Promise<MiddlewareRespond<Context, R, N>>
  • Type parameters

    • R
    • N

configure

createLogger

  • createLogger(name: string, option?: MidwayLoggerOptions): any

getAppDir

  • getAppDir(): string

getApplication

getApplicationContext

  • getApplicationContext(): IMidwayContainer

getBaseDir

  • getBaseDir(): string

getConfiguration

  • getConfiguration(key?: string): any

publicgetConnectionMiddleware

  • getConnectionMiddleware(): ContextMiddlewareManager<Context, NextFunction, undefined>

getCoreLogger

  • getCoreLogger(): ILogger

getCurrentEnvironment

  • getCurrentEnvironment(): string

publicgetFrameworkName

  • getFrameworkName(): string

publicgetFrameworkType

getLogger

  • getLogger(name?: string): any

getMiddleware

  • getMiddleware(): ContextMiddlewareManager<Context, unknown, unknown>

getNamespace

  • getNamespace(): string

getProjectName

  • getProjectName(): string

init

initialize

  • initialize(options?: IMidwayBootstrapOptions): Promise<void>

isEnable

  • isEnable(): boolean

publicrun

  • run(): Promise<void>

runGuard

  • runGuard(ctx: Context, supplierClz: new (...args: any[]) => any, methodName: string): Promise<boolean>

setNamespace

  • setNamespace(namespace: string): void

stop

  • stop(): Promise<void>

publicuseConnectionMiddleware

  • useConnectionMiddleware(middleware: CommonMiddlewareUnion<Context, NextFunction, undefined>): void

useFilter

  • useFilter(filter: CommonFilterUnion<Context, unknown, unknown>): void

useGuard

  • useGuard(guards: CommonGuardUnion<Context>): void

useMiddleware

  • useMiddleware(middleware: CommonMiddlewareUnion<Context, unknown, unknown>): void