Node.js, express, and using development versus production in app.configure
问题 What is the easiest method to let express know what environment I am in? E.g. I want do do the below to make a connection to redis depending on what env I am in. Can this be done from the command line? 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',