<commit_before>/*jslint node: true */

/**
 * Module dependencies.
 */
'use strict';

var express = require('express');
var http = require('http');
var path = require('path');
var mongoose = require('mongoose');
var winston = require('winston');
//var FileStore = require('connect-session-file');
var routes = require('./app/routes');
var config = require('./app/config/application');
var database = require('./app/config/database');
var env = process.env.NODE_ENV || 'development';

var app = express();


// --------------------------------------------------------------------------
// Application setup
// --------------------------------------------------------------------------

app.configure(function(){
  app.set('view engine', 'jade');

  app.set('port', process.env.PORT || 3000);
  app.set('host', '127.0.0.1');
  app.set('views', __dirname + '/app/views');
  
  app.use(express.favicon());

  // Logging
  // Use winston on production
  // and default express.logger on dev
  var log;
  if (env !== 'development') {
    winston.add(winston.transports.File, { filename: 'mydms.log' });
    winston.remove(winston.transports.Console);
    log = {
      stream: {
        write: function (message, encoding) {
          winston.info(message);
        }
      }
    };
  } else {
    log = 'dev';
  }
  // Don't log during tests
  if (env !== 'test') {
    app.use(express.logger(log));
  }

  app.use(express.json());
  app.use(express.urlencoded());
  app.use(require('connect-multiparty')());
  app.use(express.methodOverride());
  app.use(express.cookieParser(config.application.secret));
  app.use(express.session());

  // app.use(express.session({
  //   secret: config.application.secret,
  //   store: new FileStore({path: path.join(__dirname, 'session'), printDebug: false, useAsync: true})
  // }));

  app.use(app.router);

  if(!env || env === 'development') {
    app.use(express.static(path.join(__dirname, 'public/webapp')));
  } else if(env === 'production') {
    app.use(express.static(path.join(__dirname, 'public/webapp/dist')));
  }
});



// --------------------------------------------------------------------------<commit_msg>Fix path to angular-js-app<commit_after>/*jslint node: true */

/**
 * Module dependencies.
 */
'use strict';

var express = require('express');
var http = require('http');
var path = require('path');
var mongoose = require('mongoose');
var winston = require('winston');
//var FileStore = require('connect-session-file');
var routes = require('./app/routes');
var config = require('./app/config/application');
var database = require('./app/config/database');
var env = process.env.NODE_ENV || 'development';

var app = express();


// --------------------------------------------------------------------------
// Application setup
// --------------------------------------------------------------------------

app.configure(function(){
  app.set('view engine', 'jade');

  app.set('port', process.env.PORT || 3000);
  app.set('host', '127.0.0.1');
  app.set('views', __dirname + '/app/views');
  
  app.use(express.favicon());

  // Logging
  // Use winston on production
  // and default express.logger on dev
  var log;
  if (env !== 'development') {
    winston.add(winston.transports.File, { filename: 'mydms.log' });
    winston.remove(winston.transports.Console);
    log = {
      stream: {
        write: function (message, encoding) {
          winston.info(message);
        }
      }
    };
  } else {
    log = 'dev';
  }
  // Don't log during tests
  if (env !== 'test') {
    app.use(express.logger(log));
  }

  app.use(express.json());
  app.use(express.urlencoded());
  app.use(require('connect-multiparty')());
  app.use(express.methodOverride());
  app.use(express.cookieParser(config.application.secret));
  app.use(express.session());

  // app.use(express.session({
  //   secret: config.application.secret,
  //   store: new FileStore({path: path.join(__dirname, 'session'), printDebug: false, useAsync: true})
  // }));

  app.use(app.router);

  if(!env || env === 'development') {
    app.use(express.static(path.join(__dirname, 'public/app')));
  } else if(env === 'production') {
    app.use(express.static(path.join(__dirname, 'public/app/dist')));
  }
});



// --------------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.28069364161849714, 'fraction_numerical': 0.004624277456647399, 'mean_word_length': 2.2822458270106223, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7269656', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1271, 'n_words': 247}