yaml-config-node icon indicating copy to clipboard operation
yaml-config-node copied to clipboard

readme update for completeness

Open daver208 opened this issue 11 years ago • 0 comments

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

daver208 avatar Aug 08 '13 03:08 daver208