表达我所处环境的最简单的方法是什么?例如,我想做以下工作,根据我所处的环境进行连线。这能否从命令线进行?
app.configure( development , function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
var r = require("redis").createClient(6379, 127.0.0.1 );
});
app.configure( production , function(){
app.use(express.errorHandler());
r = redis.createClient(6379, 46.137.195.230 , { detect_buffers: true });
});