Preparing search index...
The search index is not available
Midway v3 Api Reference
Midway v3 Api Reference
@midwayjs/core
IMidwayFramework
Interface IMidwayFramework<APP, CTX, CONFIG, ResOrNext, Next>
Type Parameters
APP
extends
IMidwayApplication
<
CTX
>
CTX
extends
IMidwayContext
CONFIG
extends
IConfigurationOptions
ResOrNext =
unknown
Next =
unknown
Hierarchy
IMidwayFramework
Implemented by
BaseFramework
Index
Properties
app
configuration
Options
Methods
apply
Middleware
configure
create
Logger
get
App
Dir
get
Application
get
Application
Context
get
Base
Dir
get
Configuration
get
Core
Logger
get
Current
Environment
get
Framework
Name
get
Logger
get
Middleware
get
Namespace
get
Project
Name
initialize
is
Enable
run
run
Guard
set
Namespace
stop
use
Filter
use
Guard
use
Middleware
Properties
app
app
:
APP
configuration
Options
configuration
Options
:
CONFIG
Methods
apply
Middleware
apply
Middleware
(
lastMiddleware
?:
CommonMiddlewareUnion
<
CTX
,
ResOrNext
,
Next
>
)
:
Promise
<
MiddlewareRespond
<
CTX
,
ResOrNext
,
Next
>
>
Parameters
Optional
lastMiddleware:
CommonMiddlewareUnion
<
CTX
,
ResOrNext
,
Next
>
Returns
Promise
<
MiddlewareRespond
<
CTX
,
ResOrNext
,
Next
>
>
configure
configure
(
options
?:
CONFIG
)
:
any
Parameters
Optional
options:
CONFIG
Returns
any
create
Logger
create
Logger
(
name
:
string
, options
:
LoggerOptions
)
:
ILogger
Parameters
name:
string
options:
LoggerOptions
Returns
ILogger
get
App
Dir
get
App
Dir
(
)
:
string
Returns
string
get
Application
get
Application
(
)
:
APP
Returns
APP
get
Application
Context
get
Application
Context
(
)
:
IMidwayContainer
Returns
IMidwayContainer
get
Base
Dir
get
Base
Dir
(
)
:
string
Returns
string
get
Configuration
get
Configuration
(
key
?:
string
)
:
any
Parameters
Optional
key:
string
Returns
any
get
Core
Logger
get
Core
Logger
(
)
:
ILogger
Returns
ILogger
get
Current
Environment
get
Current
Environment
(
)
:
string
Returns
string
get
Framework
Name
get
Framework
Name
(
)
:
string
Returns
string
get
Logger
get
Logger
(
name
?:
string
)
:
ILogger
Parameters
Optional
name:
string
Returns
ILogger
get
Middleware
get
Middleware
(
)
:
IMiddlewareManager
<
CTX
,
ResOrNext
,
Next
>
Returns
IMiddlewareManager
<
CTX
,
ResOrNext
,
Next
>
get
Namespace
get
Namespace
(
)
:
string
Returns
string
get
Project
Name
get
Project
Name
(
)
:
string
Returns
string
initialize
initialize
(
options
:
Partial
<
IMidwayBootstrapOptions
>
)
:
Promise
<
void
>
Parameters
options:
Partial
<
IMidwayBootstrapOptions
>
Returns
Promise
<
void
>
is
Enable
is
Enable
(
)
:
boolean
Returns
boolean
run
run
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
run
Guard
run
Guard
(
ctx
:
CTX
, supplierClz
:
(
new
(
...
args
:
any
[]
)
=>
any
)
, methodName
:
string
)
:
Promise
<
boolean
>
Parameters
ctx:
CTX
supplierClz:
(
new
(
...
args
:
any
[]
)
=>
any
)
new
(
...
args
:
any
[]
)
:
any
Parameters
Rest
...
args:
any
[]
Returns
any
methodName:
string
Returns
Promise
<
boolean
>
set
Namespace
set
Namespace
(
namespace
:
string
)
:
void
Parameters
namespace:
string
Returns
void
stop
stop
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
use
Filter
use
Filter
(
Filter
:
CommonFilterUnion
<
CTX
,
ResOrNext
,
Next
>
)
:
void
Parameters
Filter:
CommonFilterUnion
<
CTX
,
ResOrNext
,
Next
>
Returns
void
use
Guard
use
Guard
(
guard
:
CommonGuardUnion
<
CTX
>
)
:
void
Parameters
guard:
CommonGuardUnion
<
CTX
>
Returns
void
use
Middleware
use
Middleware
(
Middleware
:
CommonMiddlewareUnion
<
CTX
,
ResOrNext
,
Next
>
)
:
void
Parameters
Middleware:
CommonMiddlewareUnion
<
CTX
,
ResOrNext
,
Next
>
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
IMidway
Framework
app
configuration
Options
apply
Middleware
configure
create
Logger
get
App
Dir
get
Application
get
Application
Context
get
Base
Dir
get
Configuration
get
Core
Logger
get
Current
Environment
get
Framework
Name
get
Logger
get
Middleware
get
Namespace
get
Project
Name
initialize
is
Enable
run
run
Guard
set
Namespace
stop
use
Filter
use
Guard
use
Middleware
Generated using
TypeDoc