Removed app.configure() and used var env = process.env.NODE_ENV