From 300f86434590581e7c9b7bf0f29c837fa174be64 Mon Sep 17 00:00:00 2001
From: Erick Hitter <services@ethitter.com>
Date: Fri, 13 Jan 2017 22:15:46 -0800
Subject: [PATCH] Correct how port is set, supporting Heroku and local dev

---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index e972bc2..4082ef3 100644
--- a/index.js
+++ b/index.js
@@ -12,7 +12,7 @@ app.use(bodyParser.json());
 app.use(bodyParser.urlencoded({ extended: true }));
 
 //use port is set in the environment variable, or 9001 if it isn’t set.
-app.set( 'port', ( config.port || 9001 ) );
+app.set( 'port', ( process.env.PORT || config.port ) );
 
 //for testing that the app is running
 app.get('/', function(req, res){
-- 
GitLab