<commit_before>#!/bin/env node
//  OpenShift sample Node application

/*global require */
/*global process */
/*global readFileSync */
/*global module */
/*jslint nomen: true*/
/*global __dirname */

var express = require('express'),
    fs      = require('fs'),
    favicon = require('static-favicon'),
    logger = require('morgan'),
    cookieParser = require('cookie-parser'),
    bodyParser = require('body-parser'),
    http = require('http'),
    path = require('path'),
    socketio  = require('socket.io'),
    Pusher = require('pusher'),
    pusher,
    MasherNodeAppj,
    routesJade,
    api,
    resource,
    app_id,
    app_key,
    app_secret,
    MasherNodeApp;

//     nodemailer = require("nodemailer");
//     smtpTransport = require('nodemailer-smtp-transport');

routesJade = require('./routes/index.js');
api = require('./routes/api');
//     contact = require('./routes/contact');  // Contact Form

resource = require('express-resource');

app_id = '40938';
app_key = '5c6bad75dc0dd1cec1a6';
app_secret = '54546672d0196be97f6a';

pusher = new Pusher({appId: app_id, key: app_key, secret: app_secret});

api.setPusher(pusher);

/**
 *  Define the sample application.
 */
MasherNodeApp = function () {
    "use strict";
    //  Scope.
    var self = this;


    /*  ================================================================  */
    /*  Helper functions.                                                 */
    /*  ================================================================  */

    /**
     *  Set up server IP address and port # using env variables/defaults.
     */
    self.setupVariables = function () {
        //  Set the environment variables we need.
        self.ipaddress = process.env.OPENSHIFT_NODEJS_IP  || '127.0.0.1';
        self.port      = process.env.OPENSHIFT_NODEJS_PORT || 3036;
        console.log('listen on:');
        console.log(self.port);
        console.log(self.ipaddress);

        if (self.ipaddress === "undefined") {
            //  Log errors on OpenShift but continue w/ 127.0.0.1 - this
            //  allows us to run/test the app locally.
            console.warn('No OPENSHIFT_NODEJS_IP var, using 127.0.0.1');<commit_msg>change self.ipaddress for openshift 3<commit_after>#!/bin/env node
//  OpenShift sample Node application

/*global require */
/*global process */
/*global readFileSync */
/*global module */
/*jslint nomen: true*/
/*global __dirname */

var express = require('express'),
    fs      = require('fs'),
    favicon = require('static-favicon'),
    logger = require('morgan'),
    cookieParser = require('cookie-parser'),
    bodyParser = require('body-parser'),
    http = require('http'),
    path = require('path'),
    socketio  = require('socket.io'),
    Pusher = require('pusher'),
    pusher,
    MasherNodeAppj,
    routesJade,
    api,
    resource,
    app_id,
    app_key,
    app_secret,
    MasherNodeApp;

//     nodemailer = require("nodemailer");
//     smtpTransport = require('nodemailer-smtp-transport');

routesJade = require('./routes/index.js');
api = require('./routes/api');
//     contact = require('./routes/contact');  // Contact Form

resource = require('express-resource');

app_id = '40938';
app_key = '5c6bad75dc0dd1cec1a6';
app_secret = '54546672d0196be97f6a';

pusher = new Pusher({appId: app_id, key: app_key, secret: app_secret});

api.setPusher(pusher);

/**
 *  Define the sample application.
 */
MasherNodeApp = function () {
    "use strict";
    //  Scope.
    var self = this;


    /*  ================================================================  */
    /*  Helper functions.                                                 */
    /*  ================================================================  */

    /**
     *  Set up server IP address and port # using env variables/defaults.
     */
    self.setupVariables = function () {
        //  Set the environment variables we need.
        self.ipaddress = '0.0.0.0'; // process.env.OPENSHIFT_NODEJS_IP  || '127.0.0.1';
        self.port      = '8080'; // process.env.OPENSHIFT_NODEJS_PORT || 3036;
        console.log('listen on:');
        console.log(self.port);
        console.log(self.ipaddress);

        if (self.ipaddress === "undefined") {
            //  Log errors on OpenShift but continue w/ 127.0.0.1 - this
            //  allows us to run/test the app locally.
            console.warn('No OPENSHIFT_NODEJS_IP var, using 127.0.0.1');
{'fraction_non_alphanumeric': 0.1984251968503937, 'fraction_numerical': 0.024521934758155232, 'mean_word_length': 2.6234718826405867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 7, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5763428', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1334, 'n_words': 293}