Permalink
Browse files

add PORT and API_HOST params

  • Loading branch information...
1 parent 17ff720 commit 7773bf564c7d5de9a397f9f1be8dfc48302f9968 @smurthas smurthas committed Sep 1, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 Procfile
  2. +3 −3 app.js
View
@@ -1 +1 @@
-app: node app.js
+web: node app.js
View
@@ -14,14 +14,14 @@ var request = require('request');
var sprintf = require('sprintf').sprintf;
// The port that this express app will listen on
-var port = 7464;
+var port = process.env.PORT || 7464;
// Your client ID and secret from http://dev.singly.com/apps
var clientId = process.env.SINGLY_CLIENT_ID;
var clientSecret = process.env.SINGLY_CLIENT_SECRET;
-var hostBaseUrl = 'http://localhost:' + port;
-var apiBaseUrl = 'https://api.singly.com';
+var hostBaseUrl = (process.env.HOST || 'http://localhost:') + port;
+var apiBaseUrl = process.env.API_HOST || 'https://api.singly.com';
// require and initialize the singly module
var singly = require('singly')(clientId, clientSecret, hostBaseUrl + '/callback');

0 comments on commit 7773bf5

Please sign in to comment.