Skip to content

Commit

Permalink
Revert "Fixing some odd character issues"
Browse files Browse the repository at this point in the history
This reverts commit 9375659.
  • Loading branch information
Kirsten Jones committed Jan 6, 2012
1 parent 015a5c8 commit 87d96f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: node app.js
web: node web.js
19 changes: 9 additions & 10 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var defaultDB = '0';
var db;

if (process.env.REDISTOGO_URL) {
var rtg = require("url").parse(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 {
Expand Down Expand Up @@ -88,19 +88,18 @@ fs.readFile('public/data/apiconfig.json', 'utf-8', function(err, data) {
}
});

// CORE UPDATE:
if (process.env.REDISTOGO_URL) {
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);
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];
}

var app = module.exports = express.createServer();

app.configure(function() {
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 87d96f8

Please sign in to comment.