new-features-node-express-4 , app.configure - 3.x 4.0.
. "set" "use".
3.x
app.configure(function(){
app.set('title', 'Application Title');
})
app.configure('development', function(){
app.set('mongodb_uri', 'mongo://localhost/dev');
})
app.configure('production', function(){
app.set('mongodb_uri', 'mongo://localhost/prod');
})
4.0
app.set('title', 'Application Title');
if ('development' == app.get('env')) {
app.set('mongodb_uri', 'mongo://localhost/dev');
}
if ('production' == app.get('env')) {
app.set('mongodb_uri', 'mongo://localhost/prod');
}