Guest User

Untitled

a guest
Jun 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var redis = require('redis');
  2.  
  3. var config = {
  4.     rhost: 'subdomain.redistogo.com', //change your subdomain
  5.     rport: 0000, //change 0000 for your port
  6.     rauth: 'yourlongmd5string' //change this for your auth key
  7. };
  8.  
  9. var db = redis.createClient(config.rport, config.rhost);
  10.  
  11. db.auth(config.rauth, function(err, reply) {
  12.     console.log(reply);
  13.    
  14.     db.get('foo', function(err, reply) {
  15.         console.log(reply);
  16.     });
  17. });
  18.  
  19. db.on('error', function(err) {
  20.     console.log(err);
  21.     db.end();
  22. });
Add Comment
Please, Sign In to add comment