Created
September 12, 2012 14:32
-
-
Save gists-app-test/3706992 to your computer and use it in GitHub Desktop.
connect to redis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( app.settings.env == 'production') { | |
console.log("Connecting to nodejitsu redis...") | |
// jitsu databases create redis rip | |
// jitsu databases list | |
var conn_url = 'redis://nodejitsu:09a5ecd07a2850a3d28f46894f8f5543@carp.redistogo.com:9552/'; | |
var rtg = url.parse(conn_url); | |
var db = redis.createClient(rtg.port, rtg.hostname); | |
var passwd = rtg.auth.split(':')[1]; | |
console.log("redis port:"+rtg.port+" hostname:"+rtg.hostname+" passwd:"+passwd); | |
db.auth(passwd); | |
sessionStore = new RedisStore(db); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment