Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var redis = require('redis');
- var config = {
- rhost: 'subdomain.redistogo.com', //change your subdomain
- rport: 0000, //change 0000 for your port
- rauth: 'yourlongmd5string' //change this for your auth key
- };
- var db = redis.createClient(config.rport, config.rhost);
- db.auth(config.rauth, function(err, reply) {
- console.log(reply);
- db.get('foo', function(err, reply) {
- console.log(reply);
- });
- });
- db.on('error', function(err) {
- console.log(err);
- db.end();
- });
Add Comment
Please, Sign In to add comment