Skip to content
Browse files

Patch for deployment to Heroku

Assuming you have a heroku account, and the command line tools:

1. $ heroku apps:create [optional app name]`
2. $ heroku addons:add rediscloud
3. $ git push heroku [local branch:]master
  • Loading branch information...
1 parent 8ac8a7a commit 58c5a62f9ecaf8c1240d29f681ad5957d23426cf @jcartledge jcartledge committed Mar 13, 2013
Showing with 22 additions and 2 deletions.
  1. +2 −0 Procfile
  2. +14 −1 app/modules/importer.js
  3. +6 −1 package.json
View
2 Procfile
@@ -0,0 +1,2 @@
+web: node app/app.js
+
View
15 app/modules/importer.js
@@ -1,6 +1,19 @@
var jira = require('./jira.js');
var redis = require('redis');
-var client = redis.createClient();
+var url = require('url');
+
+var client;
+var redisURL;
+
+if(process.env.REDISCLOUD_URL !== undefined) {
+ redisURL = url.parse(process.env.REDISCLOUD_URL);
+ client = redis.createClient(redisURL.port, redisURL.hostname, {
+ no_ready_check: true
+ });
+ client.auth(redisURL.auth.split(":")[1]);
+} else {
+ client = redis.createClient();
+}
var logKey = function (id) {
return 'TrackerTrackerImportLog' + id;
View
7 package.json
@@ -1,9 +1,14 @@
{
"name": "TrackerTracker",
"version": "0.0.1",
+ "engines": {
+ "node": "0.8.x",
+ "npm": "1.2.x"
+ },
"private": true,
"scripts": {
- "start": "node app"
+ "start": "node app/app",
+ "postinstall": "./node_modules/grunt-cli/bin/grunt"
},
"dependencies": {
"express": "3.0.4",

0 comments on commit 58c5a62

Please sign in to comment.
Something went wrong with that request. Please try again.