<commit_before>/**
 * Module dependencies.
 */

var settings
//if settings.js doesn't exist, let the user know and exit
try {
  settings = require('./settings.js');
} catch (e) {
  console.log("No settings.js file detected in root.  Try copying the settings.js.example to settings.js and add in settings.");
  return;
}

var pg = require('pg'),
  express = require('express'),
  http = require('http'),
  path = require('path'),
  settings = require('./settings'),
  common = require("./common"),
  cors = require('cors'),
  app = express();

//PostGres Connection String
global.conString = "postgres://" + settings.pg.username + ":" + settings.pg.password + "@" + settings.pg.server + ":" + settings.pg.port + "/" + settings.pg.database;

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; //fixes stream.js:94 UNABLE_TO_VERIFY_LEAF_SIGNATURE problem when using SSL

// all environments
app.set('ipaddr', settings.application.ip);
app.set('port', process.env.PORT || settings.application.port);
if (process.env.PORT) {
  settings.application.port = process.env.PORT;
}
app.set('views', 'shared_views');
app.set('view engine', 'jade');
app.set('trust proxy', true);
app.enable("jsonp callback"); //TODO: Remove this if not needed because of CORS
app.use(express.favicon(path.join(__dirname, 'public/img/favicon.png')));
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser('eobfgl-shoe'));
app.use(express.session());
<commit_msg>fs references.<commit_after>/**
 * Module dependencies.
 */

var settings
//if settings.js doesn't exist, let the user know and exit
try {
  settings = require('./settings.js');
} catch (e) {
  console.log("No settings.js file detected in root.  Try copying the settings.js.example to settings.js and add in settings.");
  return;
}

var pg = require('pg'),
  express = require('express'),
  http = require('http'),
  path = require('path'),
  settings = require('./settings'),
  common = require("./common"),
  cors = require('cors'),
  fs = require("fs"),
  _ = require("underscore"),
  https = require('https');
  app = express();

//PostGres Connection String
global.conString = "postgres://" + settings.pg.username + ":" + settings.pg.password + "@" + settings.pg.server + ":" + settings.pg.port + "/" + settings.pg.database;

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; //fixes stream.js:94 UNABLE_TO_VERIFY_LEAF_SIGNATURE problem when using SSL

// all environments
app.set('ipaddr', settings.application.ip);
app.set('port', process.env.PORT || settings.application.port);
if (process.env.PORT) {
  settings.application.port = process.env.PORT;
}
app.set('views', 'shared_views');
app.set('view engine', 'jade');
app.set('trust proxy', true);
app.enable("jsonp callback"); //TODO: Remove this if not needed because of CORS
app.use(express.favicon(path.join(__dirname, 'public/img/favicon.png')));
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(express.cookieParser('eobfgl-shoe'));
app.use(express.session());

{'fraction_non_alphanumeric': 0.18137573004542504, 'fraction_numerical': 0.001946787800129786, 'mean_word_length': 4.839015151515151, 'pattern_counts': {'":': 4, '<': 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': '5942483', 'n_tokens_mistral': 992, 'n_tokens_neox': 984, 'n_words': 226}