Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
kazana-config
Advanced tools
Kazana core module for configuration
Kazana apps can be configured in 4 ways
config: {}
setting in the app / plugin manifests
module.exports = {
name: 'myApp',
version: '1.0.0',
config: {
kazana: {
admin: {
password: 'supersecret'
}
},
myApp: {
mySetting: 'value'
}
}
}
.kazanarc
files, using the rc package.
[kazana.admin]
password = supersecret
[myApp]
mySetting = value
Environment variables
kazana_kazana__admin__password='supersecret' kazana_myApp__mySetting=value npm start
command line arguments
npm start -- --kazana.admin.password='supersecret'
See https://www.npmjs.com/package/rc#standards for more details on how configuration is retrieved, and it what order.
The settings become available as server.settings.app.<setting path>
within
the app and the plugins, for example server.settings.app.kazana.admin.password
or server.settings.app.config.myApp.mySetting
Setting Path | Default / Example |
---|---|
kazana.port | 5000 |
kazana.log.level | warn |
kazana.admin.username Database admin username | kazana |
kazana.admin.password Database admin password | secret |
kazana.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- |
kazana.backend.port | 4999 |
kazana.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 |
kazana.backend.log.file Does not apply if backend.name="couchdb" | ./.db/pouch.log |
kazana.backend.log.level Does not apply if backend.name="couchdb" | info |
kazana.backend.config.file Does not apply if backend.name="couchdb" | ./.db/config.json |
kazana.backend.timeout Time to connect database in milliseconds | 30000 |
kazana.db.rawData Name of database containing submitted raw data | kazana-raw-data |
kazana.db.integratedData Name of database containing integrated data | kazana-raw-data |
kazana.db.options Database ajax options, as passed to the PouchDB constructor. | { timeout: 10000 } |
kazana.email.service Nodemailer Email Service | gmail |
kazana.email.auth.username Nodemailer Email Service Username | e.g. joe@example.com |
kazana.email.auth.password Nodemailer Email Service Password | e.g. secret |
git clone git@github.com:eHealthAfrica/kazana-config.git
cd kazana-config
npm install
npm test
npm test
Brought to you by eHealth Africa — good tech for hard places.
FAQs
Kazana core module for configuration
The npm package kazana-config receives a total of 18 weekly downloads. As such, kazana-config popularity was classified as not popular.
We found that kazana-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.