file: /config/index.js;
var config = {
    local: {
        mode: 'local',
        port: 3000
    },
    staging: {
        mode: 'staging',
        port: 4000
    },
    production: {
        mode: 'production',
        port: 5000
    }
}
   module.exports = function(mode) {
        return config[mode || process.argv[2] || 'local'] || config.local;
    }
file: app.js;
...
var config = require('./config')();
...
http.createServer(app).listen(config.port, function(){
    console.log('Express server listening on port ' + config.port);
});
what is the meaning of config[mode || process.argv[2] || 'local'] || config.local; .
what I know ;
1) || mean is "or".
2) when we enter on terminal  node app.js staging, process.argv[2] gets 2.argument from NODE.JS command line so it is "staging".
please, someone can explain these codes snippets ?

||meansor.