Skip to content

Rapidfacture/rf-db-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rf-db

Get Settings from Rapifacture database module with error handling. Try to use 'rf-log'

installation

npm install rf-db-settings

var getDbSettings = require('rf-db-settings');


getDbSettings({
   settings: [
      {
         name: 'globalSettings',
         query: 'global'
      },
      {
         name: 'sessionSecret',
         query: 'sessionSecret',
         optional: true // this will throw a warning, but no error
      },
      {
         name: 'appSettings',
         query: config.app.name
      },
      {
         name: 'mailSettings',
         query: 'mail'
      }
   ]
   mergeDbSettingsInto: config // optional

}, function(settings){ // callback after fetch
   // settings looks like:
   // {
   //    globalSettings: Object,
   //    appSettings: Object,
   //    mailSettings: Object
   // }
});

About

Get Db Settings from Rapifacture database.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •