The first part defines the configuration object. Then it exports this object.
/, mode . , , :
var config = require('/config/index.js')('staging');
, / 'staging' mode, , return config.staging;, config ['staging'], .
|| . , . , mode - undefined, - process.argv[2], , , . $ node index staging. , .
2 , local !
: , , local, , config.local. , . redudant, or