<commit_before>'use strict';

const cfenv = require('cfenv');
const cloudant = require('cloudant');
const dotenv = require('dotenv');
const express = require('express');
const CloudantDialogStore = require('./CloudantDialogStore');
const CloudantEventStore = require('./CloudantEventStore');
const CloudantUserStore = require('./CloudantUserStore');
const EventBot = require('./EventBot');
const TwilioRestClient = require('twilio').RestClient;
const uuidV4 = require('uuid/v4');

const appEnv = cfenv.getAppEnv();
appEnv.bind = '192.168.1.70';
const app = express();
const http = require('http').Server(app);

let cloudantDialogStore;
let cloudantEventStore;
let cloudantUserStore;
let eventBot;

(function() {
    // load environment variables
    dotenv.config();
    // cloudant
    let cloudantClient = cloudant({
        url: process.env.CLOUDANT_URL,
        plugin:'promises'
    });
    cloudantDialogStore = new CloudantDialogStore(cloudantClient, process.env.CLOUDANT_DIALOG_DB_NAME);
    cloudantEventStore = new CloudantEventStore(cloudantClient, process.env.CLOUDANT_EVENT_DB_NAME || process.env.CLOUDANT_DB_NAME);
    cloudantUserStore = new CloudantUserStore(cloudantClient, process.env.CLOUDANT_USER_DB_NAME);
    eventBot = new EventBot(
        cloudantEventStore,
        cloudantUserStore,
        cloudantDialogStore,
        process.env.CONVERSATION_USERNAME,
        process.env.CONVERSATION_PASSWORD,
        process.env.CONVERSATION_WORKSPACE_ID,
        new TwilioRestClient(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN),
        process.env.TWILIO_PHONE_NUMBER,<commit_msg>Removed hard-coded IP address being used for testing<commit_after>'use strict';

const cfenv = require('cfenv');
const cloudant = require('cloudant');
const dotenv = require('dotenv');
const express = require('express');
const CloudantDialogStore = require('./CloudantDialogStore');
const CloudantEventStore = require('./CloudantEventStore');
const CloudantUserStore = require('./CloudantUserStore');
const EventBot = require('./EventBot');
const TwilioRestClient = require('twilio').RestClient;
const uuidV4 = require('uuid/v4');

const appEnv = cfenv.getAppEnv();
const app = express();
const http = require('http').Server(app);

let cloudantDialogStore;
let cloudantEventStore;
let cloudantUserStore;
let eventBot;

(function() {
    // load environment variables
    dotenv.config();
    // cloudant
    let cloudantClient = cloudant({
        url: process.env.CLOUDANT_URL,
        plugin:'promises'
    });
    cloudantDialogStore = new CloudantDialogStore(cloudantClient, process.env.CLOUDANT_DIALOG_DB_NAME);
    cloudantEventStore = new CloudantEventStore(cloudantClient, process.env.CLOUDANT_EVENT_DB_NAME || process.env.CLOUDANT_DB_NAME);
    cloudantUserStore = new CloudantUserStore(cloudantClient, process.env.CLOUDANT_USER_DB_NAME);
    eventBot = new EventBot(
        cloudantEventStore,
        cloudantUserStore,
        cloudantDialogStore,
        process.env.CONVERSATION_USERNAME,
        process.env.CONVERSATION_PASSWORD,
        process.env.CONVERSATION_WORKSPACE_ID,
        new TwilioRestClient(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN),
        process.env.TWILIO_PHONE_NUMBER,
{'fraction_non_alphanumeric': 0.10939907550077041, 'fraction_numerical': 0.004006163328197226, 'mean_word_length': 4.880434782608695, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4946933', 'n_tokens_mistral': 990, 'n_tokens_neox': 985, 'n_words': 182}