<commit_before>var redis = require("redis");

module.exports = function() {
  client = redis.createClient();
  // client = redis.createClient(6379,'127.0.0.1');
  // client = redis.createClient(12000, process.env.REDIS_HOST);
  // client.auth(process.env.REDIS_AUTH, function (err) {
  //  if (err) { throw err; }
  //  // You are now connected to your redis.
  // });
// client = redis.createClient(6379,'nodejitsudb6625264643.redis.irstack.com');
  // client.auth("nodejitsudb6625264643.redis.irstack.com:<PASSWORD>", function(err, reply) {
  //   if (err) {  console.log("Error: "+err); }
  //   else { console.log("should be connected. Reply: "+reply); }
  // });
  client.flushdb();
  // client.on('ready', function(){

  // });
};<commit_msg>modified global recs to account for local vs remote<commit_after>var redis = require("redis"),
    config = require('./config.js').config();


module.exports = function() {
  if (config.localSetup ===  true){
    client = redis.createClient(config.localRedisPort,config.localRedisURL);
  } else {
    client = redis.createClient(config.remoteRedisPort, config.remoteRedisURL);
    client.auth(config.remoteRedisAuth, function (err) {
     if (err) { throw err; }
     // You are now connected to your redis.
    });
  }
  if (config.flushDBsOnStart){
    client.flushdb();
  }
  client.on('ready', function(){
  });
};
{'fraction_non_alphanumeric': 0.17862371888726208, 'fraction_numerical': 0.02855051244509517, 'mean_word_length': 3.57190635451505, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6664271', 'n_tokens_mistral': 489, 'n_tokens_neox': 464, 'n_words': 87}