<commit_before>'use strict';

var Hapi = require('hapi');
var views = require('./views');

var isProd = process.env.NODE_ENV === 'production';

var server = new Hapi.Server();

server.connection({
  host: process.env.HOST || 'localhost',
  port: process.env.PORT || 3000,
  routes: {
    validate: {
      options: {
        abortEarly: false
      }
    }
  }
});

var plugins = [
  {
    register: require('good'),
    options: {
      opsInterval: 1000,
      reporters: [{
        reporter: require('good-console'),
        events: { log: '*', response: '*' }
      }]
    }
  },
  {
    register: require('./schema')
  },
  {
    register: require('hapi-mongoose-db-connector'),
    options: {
      mongodbUrl: process.env.MONGOLAB_URI ||
                  process.env.MONGOHQ_URL ||
                  'mongodb://localhost/colonizers'
    }
  },
  {
    register: require('hapi-auth-basic')
  },
  {
    register: require('hapi-auth-cookie')
  },
  {
    register: require('./auth'),
    options: {
      cookieSecret: process.env.COOKIE_SECRET || 'our little secret'
    }
  },
  {
    register: require('./validations')
  },
  {
    register: require('hapi-io'),
    options: {
      auth: {
        strategies: ['cookie']
      },
      socketio: { serveClient: false }
    }
  },
  {
    register: require('./pubsub'),
    options: {
      connection: {
        url: process.env.CLOUDAMQP_URL || process.env.RABBITMQ_BIGWIG_URL
      }
    }
  },
  {
    register: require('hapi-browserify'),
    options: {
      cache: isProd,
      precompile: isProd
    }
  },
  {<commit_msg>Added more env vars<commit_after>'use strict';

var Hapi = require('hapi');
var views = require('./views');

var isProd = process.env.NODE_ENV === 'production';

var server = new Hapi.Server();

server.connection({
  host: process.env.COLONIZERS_HOST || process.env.HOST || 'localhost',
  port: process.env.COLONIZERS_PORT || process.env.PORT || 3000,
  routes: {
    validate: {
      options: {
        abortEarly: false
      }
    }
  }
});

var plugins = [
  {
    register: require('good'),
    options: {
      opsInterval: 1000,
      reporters: [{
        reporter: require('good-console'),
        events: { log: '*', response: '*' }
      }]
    }
  },
  {
    register: require('./schema')
  },
  {
    register: require('./mongoose'),
    options: {
      mongodbUrl: process.env.COLONIZERS_MONGO_URL ||
                  process.env.MONGOLAB_URI ||
                  process.env.MONGOHQ_URL ||
                  'mongodb://localhost/colonizers'
    }
  },
  {
    register: require('hapi-auth-basic')
  },
  {
    register: require('hapi-auth-cookie')
  },
  {
    register: require('./auth'),
    options: {
      cookieSecret: process.env.COOKIE_SECRET || 'our little secret'
    }
  },
  {
    register: require('./validations')
  },
  {
    register: require('hapi-io'),
    options: {
      auth: {
        strategies: ['cookie']
      },
      socketio: { serveClient: false }
    }
  },
  {
    register: require('./pubsub'),
    options: {
      connection: {
        url: process.env.COLONIZERS_RABBITMQ_URL ||
             process.env.CLOUDAMQP_URL ||
             process.env.RABBITMQ_BIGWIG_URL
      },
      queue: process.env.COLONIZERS_RABBITMQ_QUEUE
    }
  },
  {
    register: require('hapi-browserify'),
    options: {
      cache: isProd,
      precompile: isProd
    }
  },
  {
{'fraction_non_alphanumeric': 0.15956508962679988, 'fraction_numerical': 0.0047017337643255955, 'mean_word_length': 2.154772937905468, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '110555', 'n_tokens_mistral': 1173, 'n_tokens_neox': 1146, 'n_words': 183}