• This is the default environment implementation for Node.js:

    • Sets variables using rudimentary command line, environment and configuration file parsers.

    • Processes UNIX-style signals and sets process exit codes via ProcessManager

    • Creates a default storage pool using the loaded configuration.

    You can modify this behavior:

    The settings are applied in this order (the higher numbers overwrite lower numbers):

    1. Some internal Defaults (mainly Loglevel and such)
    2. Config file
    3. Environment variables (MATTER_*)
    4. Command line parameters

    The following variables are defined by this class additionally to Environment:

    • environment - Name of the environment, Default "default"
    • path.root - Path considered as root for any files to store, Fallback: ".", Default: APPDATA/.matter (Windows), HOME/.matter else (or .matter-)
    • path.config - Path to config file, Default: "config.json"
    • trace.path - Path of the trace file to write, Default: "trace.jsonl" relative to path.root
    • trace.enable - Enable writing a trace file
    • storage.path - Where to store storage files, Default: "path.root"
    • storage.clear - Clear storage on start? Default: false
    • runtime.signals - By default register SIGINT and SIGUSR2 (diag) handlers, set to false if not wanted
    • runtime.exitcode - By default we set the process.exitcode to 0 (ok) or 1 (crash); set to false to disable
    • runtime.unhandlederrors - By default we log unhandled errors to matter.js log; set to false to disable

    Returns Environment