node-convict
node-convict copied to clipboard
Featureful configuration management library for Node.js
While I was using convict in a project, I realized that number format validation does not work properly. When you set a string value (other than the values that can...
## Problem As per the [FAQ](https://github.com/mozilla/node-convict/tree/master/packages/convict#how-can-i-define-a-configuration-property-as-required-without-providing-a-default-value), we can make things required by setting `default: null`, if `null` is not a valid value. With TypeScript I get the error `Type instantiation...
**Implementation of a new feature: support loading of map like objects** ``` For example: var config = { myMap: { someArbitraryKey: { schemaBoundProp: 'asdf', anotherSchemaBoundProp: 'qwer'}, anotherArbitraryKey: { schemaBoundProp: 'zxcv',...
I am trying to get the default value of `pathFilter` via [`convict.default()`](https://github.com/mozilla/node-convict/tree/master/packages/convict#configdefaultname) Below is my configSchema ``` masks: { format: 'Object', body: { doc: 'masks for body', format: 'Array', default:...
Hello There, I have following example: ``` export const config = convict({ env: { doc: 'The application environment.', default: ENV.LIVE, // === "production" format: ['production', 'development', 'test'], env: 'NODE_ENV' },...
Given a config with the following definition: ``` myTestConfig: { format: Boolean, env: 'myTestConfig', default: false } ``` An environment variable set to `myTestConfig=''` is evaluated as true. Consistently reproduced...
I have add the config.js file ``` var convict = require('convict'); convict.addFormat(require('convict-format-with-validator').ipaddress); // Define a schema const config = convict({ env: { doc: 'The application environment.', format: ['production', 'development', 'test'],...
I'm thinking the case of a 12factor app where for example the database password is in the environment. We don't want to commit the production password to the config schema....
Sry if there is already a ticket, I could not find it. Is there any way to use arrays in a ENV variable? something like `FOO=1,2,3`? I understand that comma...