yaml-config-node
yaml-config-node copied to clipboard
readme update for completeness
settings.redis.db = 10; updateConfig(settings, './config/app.yaml', 'production'); //Save 10 to redis.db of the 'production' section updateConfig({},'./config/app.yaml', 'production'); //Will remove the entire 'production' section
Should Likely be updated to:
var config = require('yaml-config'); var settings = config.readConfig('./config/app.yaml', 'production'); console.log(settings.redis.db); // prints 12 settings.redis.db = 10; config.updateConfig(settings, './config/app.yaml', 'production'); //Save 10 to redis.db of the 'production' section config.updateConfig({},'./config/app.yaml', 'production'); //Will remove the entire 'production' section