Application
Hierarchy
- IMidwayFaaSApplication
- Application
Index
Properties
Methods
- addConfigObject
- callback
- createAnonymousContext
- createContext
- createLogger
- generateMiddleware
- getAppDir
- getApplicationContext
- getAttr
- getBaseDir
- getConfig
- getCoreLogger
- getEnv
- getEventMiddleware
- getFramework
- getFrameworkType
- getFunctionName
- getFunctionServiceName
- getInitializeContext
- getLogger
- getMiddleware
- getNamespace
- getProcessType
- getProjectName
- getServerlessInstance
- inspect
- invokeTriggerFunction
- onerror
- setAttr
- setContextLoggerClass
- toJSON
- use
- useEventMiddleware
- useFilter
- useGuard
- useMiddleware
Properties
context
keys
maxIpsCount
middleware
proxy
proxyIpHeader
request
response
subdomainOffset
Methods
addConfigObject
callback
Return a request handler callback for node’s native http server.
createAnonymousContext
create a context with RequestContainer
createContext
Initialize a new context.
createLogger
Create a logger by name and options
generateMiddleware
getAppDir
Get a project root directory, without src or dist
getApplicationContext
Get global Midway IoC Container
getAttr
Get value from app attribute map
Type parameters
- T
getBaseDir
Get a base directory for project, with src or dist
getConfig
Get all configuration values or get the specified configuration through parameters
getCoreLogger
Get core logger
getEnv
Get a environment value, read from MIDWAY_SERVER_ENV
getEventMiddleware
getFramework
get current related framework
getFrameworkType
getFunctionName
Get function name in serverless environment
getFunctionServiceName
Get function service name in serverless environment
getInitializeContext
getLogger
Get default logger object or get the specified logger through parameters
getMiddleware
get global middleware
Type parameters
- R
- N
getNamespace
get current namespace
getProcessType
Get current running process type, app or agent, just for egg
getProjectName
Get project name, just package.json name
getServerlessInstance
Type parameters
- T
inspect
Inspect implementation.
invokeTriggerFunction
onerror
Default error handler.
setAttr
Set value to app attribute map
setContextLoggerClass
Set a context logger class to change default context logger format
toJSON
Return JSON representation. We only bother showing settings.
use
useEventMiddleware
useFilter
add exception filter
Type parameters
- R
- N
useGuard
add global guard
useMiddleware
add global filter to app
Type parameters
- R
- N
Add new value to current config