Preparing search index...
The search index is not available
Midway v3 Api Reference
Midway v3 Api Reference
@midwayjs/koa
Framework
Class Framework
Hierarchy
BaseFramework
<
IMidwayKoaApplication
,
IMidwayKoaContext
,
IMidwayKoaConfigurationOptions
,
Next
>
Framework
Index
Constructors
constructor
Methods
application
Initialize
before
Stop
configure
generate
Controller
generate
Middleware
get
Framework
Name
get
Framework
Type
get
Port
get
Server
load
Midway
Controller
run
use
Filter
use
Middleware
Constructors
constructor
new
Framework
(
applicationContext
:
IMidwayContainer
)
:
Framework
Parameters
applicationContext:
IMidwayContainer
Returns
Framework
Methods
application
Initialize
application
Initialize
(
options
:
Partial
<
IMidwayBootstrapOptions
>
)
:
Promise
<
void
>
Parameters
options:
Partial
<
IMidwayBootstrapOptions
>
Returns
Promise
<
void
>
before
Stop
before
Stop
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
configure
configure
(
)
:
IMidwayKoaConfigurationOptions
Returns
IMidwayKoaConfigurationOptions
generate
Controller
generate
Controller
(
routeInfo
:
RouterInfo
)
:
Middleware
<
DefaultState
,
IMidwayKoaContext
,
any
>
wrap controller string to middleware function
Parameters
routeInfo:
RouterInfo
Returns
Middleware
<
DefaultState
,
IMidwayKoaContext
,
any
>
generate
Middleware
generate
Middleware
(
middlewareId
:
any
)
:
Promise
<
Middleware
<
DefaultState
,
IMidwayKoaContext
,
any
>
>
Deprecated
Parameters
middlewareId:
any
Returns
Promise
<
Middleware
<
DefaultState
,
IMidwayKoaContext
,
any
>
>
get
Framework
Name
get
Framework
Name
(
)
:
string
Returns
string
get
Framework
Type
get
Framework
Type
(
)
:
MidwayFrameworkType
Returns
MidwayFrameworkType
get
Port
get
Port
(
)
:
string
Returns
string
get
Server
get
Server
(
)
:
Server
<
typeof
IncomingMessage
,
typeof
ServerResponse
>
Returns
Server
<
typeof
IncomingMessage
,
typeof
ServerResponse
>
load
Midway
Controller
load
Midway
Controller
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
run
run
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
use
Filter
use
Filter
(
Filter
:
CommonFilterUnion
<
IMidwayKoaContext
,
Next
,
unknown
>
)
:
void
Parameters
Filter:
CommonFilterUnion
<
IMidwayKoaContext
,
Next
,
unknown
>
Returns
void
use
Middleware
use
Middleware
(
Middleware
:
CommonMiddlewareUnion
<
IMidwayKoaContext
,
Next
,
unknown
>
)
:
void
Parameters
Middleware:
CommonMiddlewareUnion
<
IMidwayKoaContext
,
Next
,
unknown
>
Returns
void
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Modules
Midway v3
Api
Reference
@midwayjs/bootstrap
@midwayjs/core
Consumer
Metadata
FaaSMetadata
GRPCMetadata
@midwayjs/decorator
@midwayjs/koa
Framework
constructor
application
Initialize
before
Stop
configure
generate
Controller
generate
Middleware
get
Framework
Name
get
Framework
Type
get
Port
get
Server
load
Midway
Controller
run
use
Filter
use
Middleware
Generated using
TypeDoc
wrap controller string to middleware function