Hi Guys, I am new here and to node.js or any mvc programming...

I have a question that I keep seeing most developers are doing some settings to their production and development environment, like the one in node.js/ express.js

Code:
app.configuration(function('development', function(){
   app.set('db url', 'localhost/dev');
})

// production only.
app.configuration('production', function(){
   app.set('db url', 'n.n.n.n/prod');
})
the questions is how do node.js knows when to use these environment?