Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kazana-config

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kazana-config

Kazana core module for configuration

  • 5.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

kazana-config

Kazana core module for configuration

NPM version Dependency Status Build Status Coverage Status

Usage

Kazana is configured using .kazanarc files, using the rc package.

module.exports = {
  name: 'myapp',
  version: '1.0.0'
}

When loaded as plugin, it's looking for a [plugin.<name>] section within the .kazanarc files. Additionally, default configuration can be passed:

module.exports = {
  name: 'myapp',
  version: '1.0.0',
  config: {
    admin: {
      user: 'myadmin',
      password: 'secret'
    }
  }
}

Configuration can be also passed ase environment varibales

kazana_admin__password = 'supersecret' npm start

or as command line arguments

npm start -- --admin.password='supersecret'

See https://www.npmjs.com/package/rc#standards for the full list and order of configuration sources.

Within services, the settings are available as server.settings.app.<setting path>, for example server.settings.app.admin.password

Setting PathDefault / Example
port 5000
log.level warn
admin.username
Database admin username
kazana
admin.password
Database admin password
secret
backend.name
When undefined, defaults to pouchdb-server's built-in "leveldown". Can be set to "couchdb" or any levelup storage back-ends: https://github.com/Level/levelup/wiki/Modules#storage-back-ends
-no default-
backend.port 4999
backend.location
Location option as it gets passed to levelup https://github.com/Level/levelup#leveluplocation-options-callback If backend.name="couchdb", set the couchdb url without credententials, e.g. "https://my.couch.com"
./.db
backend.log.file
Does not apply if backend.name="couchdb"
./.db/pouch.log
backend.log.level
Does not apply if backend.name="couchdb"
info
backend.config.file
Does not apply if backend.name="couchdb"
./.db/config.json
backend.timeout
Time to connect database in milliseconds
30000
db.rawData
Name of database containing submitted raw data
kazana-raw-data
db.integratedData
Name of database containing integrated data
kazana-raw-data
db.options
Database ajax options, as passed to the PouchDB constructor.
{ timeout: 10000 }
email.service
Nodemailer Email Service
gmail
email.auth.username
Nodemailer Email Service Username
e.g. joe@example.com
email.auth.password
Nodemailer Email Service Password
e.g. secret

Local setup and Testing

git clone git@github.com:eHealthAfrica/kazana-config.git
cd kazana-config
npm install
npm test

Test

devDependency Status

npm test

Credit

Brought to you by eHealth Africa — good tech for hard places.

License

Apache-2.0

Keywords

FAQs

Package last updated on 02 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc