Interface: INodeOptions
The options when running the node.
Properties
serverName?
optionalserverName:string
The name of the server, defaults to "TWIN Node Server".
Default
"TWIN Node Server"
serverVersion?
optionalserverVersion:string
The version of the server, defaults to the current version.
envVars?
optionalenvVars:object
Additional environment variables to set.
Index Signature
[key: string]: string
envFilenames?
optionalenvFilenames:string[]
Additional environment variable filenames to load, defaults to .env.
envPrefix?
optionalenvPrefix:string
The prefix for environment variables, defaults to "TWIN_".
configFilenames?
optionalconfigFilenames:string[]
A list of JSON files to load as configuration files. The files will be loaded in the order they are provided, and the last one will override any previous values.
config?
optionalconfig:IEngineConfig
Provides the ability to have some initial custom configuration for the engine. This will be merged with any configuration loaded from the environment variables.
executionDirectory?
optionalexecutionDirectory:string
The directory to override the execution location, defaults to process directory.
localesDirectory?
optionallocalesDirectory:string
The directory to override the locales directory, defaults to the locales directory.
openApiSpecFile?
optionalopenApiSpecFile:string
The path to the OpenAPI spec file, defaults to docs/open-api/spec.json.
favIconFile?
optionalfavIconFile:string
The path to the favicon, defaults to static/favicon.png.
extendEnvVars()?
optionalextendEnvVars: (envVars) =>Promise<void>
Method to extend the engine environment variables with any additional custom configuration.
Parameters
envVars
Returns
Promise<void>
extendConfig()?
optionalextendConfig: (envVars,config) =>Promise<void>
Method to extend the engine configuration with any additional custom configuration.
Parameters
envVars
config
Returns
Promise<void>
extendEngine()?
optionalextendEngine: (engine) =>Promise<void>
Method to extend the engine with any additional options.
Parameters
engine
IEngineCore
Returns
Promise<void>
extendEngineServer()?
optionalextendEngineServer: (engineServer) =>Promise<void>
Method to extend the engine server with any additional options.
Parameters
engineServer
IEngineServer
Returns
Promise<void>
stateStorage?
optionalstateStorage:IEngineStateStorage<IEngineState>
The state storage to use for the engine. If not provided, a default file-based state storage will be used.
disableProcessExitOnFailure?
optionaldisableProcessExitOnFailure:boolean
Disables process.exit calls on fatal errors and throws instead.