Navigation Menu

Skip to content

Commit

Permalink
Revert "Adding the heroku stuff"
Browse files Browse the repository at this point in the history
This reverts commit 4508f5d.
  • Loading branch information
Kirsten Jones committed Jan 6, 2012
1 parent 87d96f8 commit 3e192c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion Procfile

This file was deleted.

21 changes: 2 additions & 19 deletions app.js
Expand Up @@ -49,16 +49,8 @@ try {
// Redis connection
//
var defaultDB = '0';
var db;

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(process.env.REDISTOGO_URL);
db = require("redis").createClient(rtg.port, rtg.hostname);
db.auth(rtg.auth.split(":")[1]);
} else {
db = redis.createClient(config.redis.port, config.redis.host);
db.auth(config.redis.password);
}
var db = redis.createClient(config.redis.port, config.redis.host);
db.auth(config.redis.password);

// Select our DB
db.on("connect", function() {
Expand Down Expand Up @@ -91,15 +83,6 @@ fs.readFile('public/data/apiconfig.json', 'utf-8', function(err, data) {
var app = module.exports = express.createServer();

app.configure(function() {
// CORE UPDATE:
if (process.env.REDISTOGO_URL) {
// use production (Heroku) redis configuration
// overwrite `config` to keep it simple
var rtg = require(‘url’).parse(process.env.REDISTOGO_URL);
config.redis.port = rtg.port;
config.redis.host = rtg.hostname;
config.redis.password = rtg.auth.split(:)[1];
}
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.logger());
Expand Down

0 comments on commit 3e192c3

Please sign in to comment.