node-easysettings
simple module to manage setting file/storage file for simple program
install
npm install easysettings
example
Suppose it's test.js
var EasySettings = EasySettings;var es = ;//default config save path is ./filename.conf.json//filename is obtained from process.arvs[1] without extname//in this case which is "test"//or you can just set itvar es = "/etc/myconfig.json"; //default is useful when your script running at the first timees;//if first-time running,default settings will be used //if not set,{} will be usedvar settings = es;console;//return value of EasySettings.load is the reference of the settings json object from easy settings//which means you can directly modify it and save the EasySettings like belowsettingsconf = "conf";es;//load again will just replace the reference//so you should get it againsettings = es;console;//print {name:"settings",conf:"conf"}