Node module - CMD-Conf
A command line analyser for Node.JS. View NPM registry
This module analyses the command line syntax to extract parameters and return them into an associative array.
Example
I want to configure my listen port and activate the verbose mode like this :
$ node server.js -p 80 -v
or
$ node server.js --port 80 --verbose
server.js
var cmdConf = ; cmdConf; var params = cmdConf; var myPort = paramslistenPort; var verbose = paramsverbose;
If you give a simple string to the configure()
method, witch represent the path of
a JSON file, cmd-conf try to resolve path and load config from this file.
More information coming soon