跳到主要内容
版本:Next

MidwayAdapter

Implements

  • IServerAdapter

Index

Constructors

constructor

Methods

publicgetEntryRoute

  • getEntryRoute(): AppViewRoute

publicgetStaticRoutes

  • getStaticRoutes(): string

publicgetViewRoutes

  • getViewRoutes(): string[]

publicmatchApiRoutes

  • matchApiRoutes(method: string, url: string): AppControllerRoute

publicrenderStatic

  • renderStatic(filename: any): Promise<any>

publicrenderView

  • renderView(filename: any, params?: {}): Promise<unknown>

publicrunAPI

  • runAPI(route: any, query: any): Promise<any>

publicsetApiRoutes

publicsetBasePath

publicsetEntryRoute

publicsetErrorHandler

  • setErrorHandler(handler: (error: Error) => ControllerHandlerReturnType): MidwayAdapter

publicsetQueues

publicsetStaticPath

  • setStaticPath(staticsRoute: string, staticsPath: string): MidwayAdapter

publicsetUIConfig

publicsetViewsPath