Interface: Environment
Defined in: packages/core/src/boot.ts:63
App environment for single env key.
The production environment is used as a base template for other
environment configurations. Meaning that all dev or test env
definitions are deeply merged into prod base config.
So you can only define other-env specific overrides without the need to re-define whole custom configuration.
Indexable
[key: string]: unknown
Properties
$App?
optional$App:$AppSettings
Defined in: packages/core/src/boot.ts:89
$Debug?
optional$Debug:boolean
Defined in: packages/core/src/boot.ts:70
Enable/disable debug mode. When enabled you can see additional error messages while this also enable some additional validation that can produce additional errors.
$Language?
optional$Language:Record<string,string>
Defined in: packages/core/src/boot.ts:87
$Resources()?
optional$Resources: (response,manifest,defaultResources) =>Resources
Defined in: packages/core/src/boot.ts:90
Parameters
response
unknown
manifest
defaultResources
Returns
$Server?
optional$Server:object
Defined in: packages/core/src/boot.ts:95
cache?
optionalcache:object
Cache configuration.
cache.cacheKeyGenerator()?
optionalcacheKeyGenerator: (req) =>string
Cache key generator function.
Parameters
req
Request
Returns
string
cache.enabled?
optionalenabled:boolean| (req) =>boolean
Enable/disable cache for the server.
cache.entryTtl?
optionalentryTtl:number
The maximum time a cache entry is kept. [ms]
cache.maxEntries?
optionalmaxEntries:number
The maximum entries in cache.
cache.unusedEntryTtl?
optionalunusedEntryTtl:number
The time after which the unused entries are discarded. [ms]
clusters?
optionalclusters:number|null
Define the number of server processes you want to start.
Use null for the current number of available CPU cores.
concurrency?
optionalconcurrency:number
The number of application instances (not threads) used to handle concurrent connections within a single thread.
degradation?
optionaldegradation:object
Degradation functions for the server.
degradation.isOverloaded()?
optionalisOverloaded: (event) =>boolean
Parameters
event
any
Returns
boolean
degradation.isSPA()?
optionalisSPA: (event) =>boolean
Parameters
event
any
Returns
boolean
degradation.isSPAPrefetch()?
optionalisSPAPrefetch: (event) =>boolean
Parameters
event
any
Returns
boolean
degradation.isStatic()?
optionalisStatic: (event) =>boolean
Parameters
event
any
Returns
boolean
host?
optionalhost:string| (__namedParameters) =>string
When defined it overrides any other host settings in the urlParser hook.
logger?
optionallogger:object
logger.formatting?
optionalformatting:"dev"|"simple"|"JSON"
Use "simple", "JSON" or "dev". "dev" option produces colorful output with source-mapping of error stacks. This is usefull in development.
port?
optionalport:number
The port at which the server listens for incoming HTTP connections
protocol?
optionalprotocol:"http:"|"https:"| (__namedParameters) =>"http:"|"https:"
When defined it overrides any other protocol settings in the urlParser hook.
staticPath?
optionalstaticPath:string
Base path, which serves static files form the build folder, see https://imajs.io/cli/ima-config-js/#publicpath for more info. Used in staticPath middleware definition in app.js.
$Version
$Version:
string
Defined in: packages/core/src/boot.ts:88