title: Scan strings using nodejs in redis
body: <p>I am trying to scan the string on redis server by using redis, redis-scanner module but it is not working..</p>
  
  <p>Please find my code as below and written by node js. Any help would appreciated </p>
  
  <pre><code>var conf = require('./config.js'); //config file declarations
  var restify = require('restify'); //restify included
  var redis = require("redis"); //redis included
  var redis_scanner = require('redis-scanner');
  
  var client = redis.createClient(conf.get('redis_cm.redis_port'), conf.get('redis_cm.redis_server'));
      client.auth(conf.get('redis_cm.auth'), function (err) {
          if (err){
              throw err;
          }
      });
      client.on('connect', function() {
          console.log('Connected to Redis');
      });
      client.select(conf.get('redis_cm.database'), function() {
          console.log("Redis Database "+conf.get('redis_cm.database')+" selected successfully!..");
      });
  
  
  var options = {
      args: ['MATCH','CM:*','COUNT','5'],
      onData: function(result, done){
          console.log(result);
          console.log("result");
          client.quit();    
          process.exit(1);
      },
      onEnd: function(err){
          console.log("error");
      }
  };
  
  var scanner = new redis_scanner.Scanner(client, 'SCAN', null, options);
  </code></pre>