kazana-config
Advanced tools
Comparing version 3.0.0 to 3.1.0
module.exports = getConfig; | ||
module.exports.parseConfig = require('12factor-config'); | ||
module.exports.raw = { | ||
appPort: { | ||
env: 'KAZANA_APP_PORT', | ||
type: 'integer', | ||
default: 5000 | ||
}, | ||
backendPort: { | ||
env: 'KAZANA_BACKEND_PORT', | ||
type: 'integer', | ||
default: 4999, | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
adminUser: { | ||
env: 'KAZANA_ADMIN_USER', | ||
default: 'kazana' | ||
}, | ||
adminPass: { | ||
env: 'KAZANA_ADMIN_PASS', | ||
default: 'secret' | ||
}, | ||
backendName: { | ||
env: 'KAZANA_BACKEND_NAME', | ||
description: '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' | ||
}, | ||
backendLocation: { | ||
env: 'KAZANA_BACKEND_LOCATION', | ||
default: './.db/', | ||
description: 'location option as it gets passed to levelup https://github.com/Level/levelup#leveluplocation-options-callback If KAZANA_BACKEND_NAME="couchdb", set the couchdb url without credententials, e.g. "https://my.couch.com"' | ||
}, | ||
backendLogFile: { | ||
env: 'KAZANA_BACKEND_LOG_FILE', | ||
default: './.db/pouch.log', | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
backendLogLevel: { | ||
env: 'KAZANA_BACKEND_LOG_LEVEL', | ||
default: 'info', | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
backendConfigFile: { | ||
env: 'KAZANA_BACKEND_CONFIG_FILE', | ||
default: './.db/config.json', | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
dbRawData: { | ||
env: 'KAZANA_DB_RAW_DATA', | ||
default: 'kazana-raw-data', | ||
description: 'Name of database containing submitted raw data' | ||
}, | ||
dbIntegratedData: { | ||
env: 'KAZANA_DB_INTEGRATED_DATA', | ||
default: 'kazana-integrated-data', | ||
description: 'Name of database containing integrated data' | ||
}, | ||
emailService: { | ||
env: 'KAZANA_EMAIL_SERVICE', | ||
default: 'gmail', | ||
description: 'Nodemailer Email Service' | ||
}, | ||
emailAuthUsername: { | ||
env: 'KAZANA_EMAIL_AUTH_USERNAME', | ||
description: 'Nodemailer Email Service Username' | ||
}, | ||
emailAuthPassword: { | ||
env: 'KAZANA_EMAIL_AUTH_PASSWORD', | ||
description: 'Nodemailer Email Service Password' | ||
} | ||
}; | ||
@@ -8,70 +76,3 @@ /** | ||
function getConfig () { | ||
return module.exports.parseConfig({ | ||
appPort: { | ||
env: 'KAZANA_APP_PORT', | ||
type: 'integer', | ||
default: 5000 | ||
}, | ||
backendPort: { | ||
env: 'KAZANA_BACKEND_PORT', | ||
type: 'integer', | ||
default: 4999, | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
adminUser: { | ||
env: 'KAZANA_ADMIN_USER', | ||
default: 'kazana' | ||
}, | ||
adminPass: { | ||
env: 'KAZANA_ADMIN_PASS', | ||
default: 'secret' | ||
}, | ||
backendName: { | ||
env: 'KAZANA_BACKEND_NAME', | ||
description: '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' | ||
}, | ||
backendLocation: { | ||
env: 'KAZANA_BACKEND_LOCATION', | ||
default: './.db/', | ||
description: 'location option as it gets passed to levelup https://github.com/Level/levelup#leveluplocation-options-callback If KAZANA_BACKEND_NAME="couchdb", set the couchdb url without credententials, e.g. "https://my.couch.com"' | ||
}, | ||
backendLogFile: { | ||
env: 'KAZANA_BACKEND_LOG_FILE', | ||
default: './.db/pouch.log', | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
backendLogLevel: { | ||
env: 'KAZANA_BACKEND_LOG_LEVEL', | ||
default: 'info', | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
backendConfigFile: { | ||
env: 'KAZANA_BACKEND_CONFIG_FILE', | ||
default: './.db/config.json', | ||
description: 'Does not apply if KAZANA_BACKEND_NAME="couchdb"' | ||
}, | ||
dbRawData: { | ||
env: 'KAZANA_DB_RAW_DATA', | ||
default: 'kazana-raw-data', | ||
description: 'Name of database containing submitted raw data' | ||
}, | ||
dbIntegratedData: { | ||
env: 'KAZANA_DB_INTEGRATED_DATA', | ||
default: 'kazana-integrated-data', | ||
description: 'Name of database containing integrated data' | ||
}, | ||
emailService: { | ||
env: 'KAZANA_EMAIL_SERVICE', | ||
default: 'gmail', | ||
description: 'Nodemailer Email Service' | ||
}, | ||
emailAuthUsername: { | ||
env: 'KAZANA_EMAIL_AUTH_USERNAME', | ||
description: 'Nodemailer Email Service Username' | ||
}, | ||
emailAuthPassword: { | ||
env: 'KAZANA_EMAIL_AUTH_PASSWORD', | ||
description: 'Nodemailer Email Service Password' | ||
} | ||
}); | ||
return module.exports.parseConfig(module.exports.raw); | ||
} |
@@ -48,3 +48,3 @@ { | ||
}, | ||
"version": "3.0.0" | ||
"version": "3.1.0" | ||
} |
require('./specs/config'); | ||
require('./specs/parse'); | ||
require('./specs/raw'); |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13669
14
190
1