什么是NODE_ENV以及如何在Express中使用它?
这是我目前在生产上运行的应用。
var app = express();
app.set('views',settings.c.WEB_PATH + '/public/templates');
app.set('view engine','ejs');
app.configure(function(){
app.use(express.favicon());
app.use(express.static(settings.c.WEB_PATH + '/public'));
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.methodOverride());
app.use(express.session({
cookie:{ domain:"."+settings.c.SITE_DOMAIN, maxAge:1440009999},
secret:'hamster',
store: r_store,
}));
app.use(useragent.express());
app.use(flash());
app.use(passport.initialize());
app.use(passport.session());
});
现在我已经了解并想使用它。我该怎么做?NODE_ENV