How to use iniparser.parseSync:
GitHub: Labs22/BlackServerOS
108 109 110 111 112 113 114 115 116 117 118 119 120
if (!fs.existsSync(internals.configFile)) { console.log("ERROR - Couldn't open config file '" + internals.configFile + "' maybe use the -c <configfile> option"); process.exit(1); } internals.config = ini.parseSync(internals.configFile); if (internals.config["default"] === undefined) { console.log("ERROR - [default] section missing from", internals.configFile);
25
44
6
See more examples