From 8405da136e3e8f34f67dffb468089ec658e4ac31 Mon Sep 17 00:00:00 2001
From: Jed Parsons <jedp@me.com>
Date: Wed, 1 Aug 2012 09:50:09 -0700
Subject: [PATCH] can configure kpi datastore url with env var

---
 lib/configuration.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/configuration.js b/lib/configuration.js
index 38b33467a..e6a581939 100644
--- a/lib/configuration.js
+++ b/lib/configuration.js
@@ -138,7 +138,11 @@ var conf = module.exports = convict({
     format: 'number = 0.0',
     env: 'KPI_BACKEND_SAMPLE_RATE'
   },
-  kpi_backend_db_url: 'string = "http://localhost/wsapi/interaction_data"',
+  kpi_backend_db_url: {
+    doc: "URL of KPiggyBank service to send Key Performance Indicator data to",
+    format: 'string = "http://localhost/wsapi/interaction_data"',
+    env: 'KPI_BACKEND_DB_URL'
+  },
   bcrypt_work_factor: {
     doc: "How expensive should we make password checks (to mitigate brute force attacks) ?  Each increment is 2x the cost.",
     format: 'integer{6,20} = 12',
-- 
GitLab