这是我目前正在生产中运行的应用程序。
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
并想使用它。我怎样才能做到这一点?