1.1.1 • Published 7 years ago

config-module v1.1.1

Weekly downloads
3
License
Apache-2.0
Repository
github
Last release
7 years ago

config-module

Configuration loader that creates a default config.js module if one does not exist.

The config.js module it creates is either not present and one is created with the configuration passed, or if it's already there, it will return the existing saved configuration.

Once the config.js has been created on its first run, you can then change its values to meet your requirements.

Example Usage:

const ConfigModule = require('config-module');

// load config or use the default configuration 
// and save it as config.js
const config = ConfigModule.load({
   service: {
       domain: 'https://some.place.com',
       username: 'yourusername@yourdomain.com',
       password: 'supersecretpassword'
   },
   somethingElse: {
       this: 'the other thing'
   }
});

console.log(config.service.domain); 
// will return: https://some.place.com
1.1.1

7 years ago

1.1.0

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago