Config

The program can be configured with a rc file such as .nhairc, .nhairc.js, .nhairc.yml, etc. see cosmiconfig for allowed file names. This is documentation for the various config options.

Classes

Config

Members

inner app-name :string

Name of the application, mostly for cosmetic purposes.

Default Value:
  • nhai

inner app-version :string

Version of the application picked up from package.json, for cosmetic purposes.

inner debug-break-on-entry :boolean

Whether the debugger should break on the first event after the program starts.

Default Value:
  • false

inner debug-sync-environment :boolean

The environment won't keep running if a breakpoint is hit.

Default Value:
  • true

inner environment-async-time :number

The interval of ticks in a synchronous environment.

Default Value:
  • 100

inner environment-sync-watchdog-timeout :number

If the environment is synchronous, how long to wait before worrying that we haven't gotten a nextTick().

Default Value:
  • 3000

inner environment-synchronous :boolean

Whether the environment is sychronous (e.g. turn-based) or asynchronous (e.g. real-time). Note that asynchronous is currently untested.

Default Value:
  • true

inner graphdb-name :string

The database name to use within the Graph Database.

Default Value:
  • nhai

inner html-template-dir :string

Path to directory where HTML templates are stored.

Default Value:
  • assets/hbs

inner locale :string

The location / country used for interpreting date / time. Used for logging and potentially other timestamps.

Default Value:
  • default

inner log-error-stack :boolean

For error and fatal messages, always log the stack regardless of whether an Error was logged.

Default Value:
  • false

inner log-error-stack-length :integer

Maximum number of lines to print from the stack dump. Applies globally.

Default Value:
  • 64

inner log-file-enabled :boolean

Whether to write log messages to a file.

Default Value:
  • false

inner log-file-path :string

Path to the directory for storing log files

Default Value:
  • .

inner log-file-prefix :string

First part of the file name when writting log files

Default Value:
  • nhai-

inner log-file-suffix :string

Last part of the file name when writing log files

Default Value:
  • .log

inner log-force-color :boolean

Force color logging, even if not ta TTY (can be messy but good for testing).

Default Value:
  • true

inner log-level :string

Default level of messages that should be printed: trace, debug, info, warn, error, fatal.

Default Value:
  • trace

inner log-patch-console :boolean

Whether Log.init should monkey patch console.log

Default Value:
  • true

inner log-start-msg :boolean

Print a "Starting..." msg when logger is initialized.

Default Value:
  • false

inner random-seed :string

Seed for the PRNG / DRNG

Default Value:
  • goodluck!

inner redisgraph-options :object

The redis graph database connection options.

Default Value:
  • undefined

inner redisgraph-port :string

The redis graph database server port.

Default Value:
  • 6379

inner redisgraph-server :string

The redis graph database server IP address

Default Value:
  • 127.0.0.1

inner schema-dir :string

The directory holding JSON schemas to validate various data types