figc
Merge config files with command-line arguments.
examples
server
server.js:
var figc = ;var config = ;var http = ;var server = http;server;
config.json:
"port" : 8085"msg" : "..."
default output:
$ node server.js &
[1] 19109
$ curl -sN http://localhost:8085
...
custom port and message:
$ node server.js --msg='beep boop' --port=8086 &
[1] 19114
$ curl -sN http://localhost:8086
beep boop
methods
var figc = ;
var config = figc(configFile, argv=process.argv)
Load a json configuration from configFile
and merge its contents with argv
which will be parsed by
optimist.
install
With npm do:
npm install figc
license
MIT/X11