Configuration

🚧

Draft Documentation

Space.configuration

Allows centralised global configuration the Space environment

{
 // testMode: ['SPACE_TESTMODE', false, 'bool']
  sysLog : {
    enabled: ['SPACE_SYSLOG_ENABLED', false, 'bool']
  },
  appLog : {
    enabled: ['SPACE_APPLOG_ENABLED', false, 'bool']
  }
}

Module.configuration (Application)

Some Runtime Configuration can be set using Environment Variables, which are specified below as an array value. Options yet to be implemented have been commented out.

Configuration: {
  jobQueue: {
    mongoUrl: ['SPACE_JQ_MONGO_URL', '', 'string'],
    mongoOplogUrl: ['SPACE_JQ_MONGO_OPLOG_URL', '', 'string']
    collectionName: ['SPACE_JQ_COLLECTION_NAME', 'space_jobQueue', 'string']
  }
  eventSourcing: {
    log: {
      enabled: ['SPACE_ES_LOG_ENABLED', false, 'bool']
    }
    commits: {
      processingTimeout: ['SPACE_ES_COMMITS_PROCESSING_TIMEOUT', 1000, 'int']
    }
    snapshotting: {
      enabled: ['SPACE_ES_SNAPSHOTTING_ENABLED', true, 'bool']
      frequency: ['SPACE_ES_SNAPSHOTTING_FREQUENCY', 10, 'int']
    }
  }
}

process.ENV API

VariableExample valuesStatus
SPACE_TESTMODEtrue,falseProposed
SPACE_SYSLOG_ENABLEDtrue,falsePre-Production
SPACE_APPLOG_ENABLEDtrue,falsePre-Production
SPACE_JQ_LOG_ENABLED0,1,true,falsePre-Production
SPACE_JQ_MONGO_URL"mongodb://localhost:27017/dbName"Pre-Production
SPACE_JQ_MONGO_OPLOG_URL"mongodb://localhost:27017/local?authSource=dbName?replicaSet=set-xx"Pre-Production
SPACE_JQ_COLLECTION_NAMEmy_custom_collection_namePre-Production
SPACE_ES_LOG_ENABLEDtrue,falsePre-Production
SPACE_ES_MONGO_URL"mongodb://localhost:27017/dbName"Pre-production
SPACE_ES_MONGO_OPLOG_URL"mongodb://localhost:27017/local?authSource=dbName?replicaSet=set-xx"Pre-production
SPACE_ES_COMMITS_COLLECTION_NAMEmy_custom_collection_namePre-production
SPACE_ES_SNAPSHOTTING_COLLECTION_NAMEmy_custom_collection_namePre-production