visionmedia/express — Issue #1035: Getting NODE_ENV value
Author: InspiredJW
Created: 2012-03-02 02:53:10+00:00
State: open

I'm using Express for framework.

And I would like to divide my configuration to "development" and "production".

I know that I can use

app.configure('development', function() {});
app.configure('production', function() {});

But I want to know the way actually how I can know what the NODE_ENV value is.

I tried to find in global variables but I could not find.

I really need this to use other Database configuration depends on NODE_ENV

in my database config.js file.