@nodulus/singleton
v1.0.0
Published
configuration component for nodulus.
Downloads
4
Readme
@nodulus/config
configuration component for nodulus.
install
npm install @nodulus/config
usage
var config=require("@nodulus/config").config;
var consts=require("@nodulus/config").consts;
var settings = config.appSettings;
config file format
{
"name": "nodulus",
"url": "",
"port": "4000",
"appRoot": "/",
"enableSockets": true,
"database": {
"mongodb": {
"useObjectId": true,
"host": "---mongo url---"
}
||
{ "diskdb": { "host": "server/data" } }
}
}
set config file location
SET CONFIG_PATH = '--config--path--'
config object api
persistConfiguration()
persistModules()
mergeConfiguration(configuration_to_merge: any, key: string)