<commit_before>/* global require, module, process, console, __dirname */
/* jshint -W097 */
'use strict';


// BASE SETUP
// =============================================================================
var
  fs         = require('fs'),
  express    = require('express'),
  bodyParser = require('body-parser'),
  mongoose   = require('mongoose'),

  rootDir    = __dirname + '/../../',
  publicDir  = rootDir + 'dist/',
  routesDir  = __dirname + '/routes/',
  port       = process.env.PORT || 5000,
  app        = express();


// configure app to use bodyParser()
// this will let us get the data from a POST
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

// configure app to serve static files from the dist directory
app.use(express.static(publicDir));

// root
app.get('/', function(req, res) {
    res.sendfile(publicDir + 'index.html');
});


// MONGO CONF.
// =============================================================================
var mongoConfigParser = require('./lib/mongoConfigParser');

var mongoConn = new mongoConfigParser()
  .setEnvDir( rootDir + 'db/mongo/env' )
  .getConnectionString();

// connect
mongoose.connect(mongoConn)



// API ROUTES
// =============================================================================

var router = express.Router();

// middleware to use for all requests
router.use(function(req, res, next) {
  next(); // make sure we go to the next routes and don't stop here
});

// test route to make sure everything is working (accessed at GET http://localhost:PORT/api)
router.get('/', function(req, res) {
  res.json({ message: 'hooray! welcome to our api!' });
});
<commit_msg>Add missing semicolon<commit_after>/* global require, module, process, console, __dirname */
/* jshint -W097 */
'use strict';


// BASE SETUP
// =============================================================================
var
  fs         = require('fs'),
  express    = require('express'),
  bodyParser = require('body-parser'),
  mongoose   = require('mongoose'),

  rootDir    = __dirname + '/../../',
  publicDir  = rootDir + 'dist/',
  routesDir  = __dirname + '/routes/',
  port       = process.env.PORT || 5000,
  app        = express();


// configure app to use bodyParser()
// this will let us get the data from a POST
app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

// configure app to serve static files from the dist directory
app.use(express.static(publicDir));

// root
app.get('/', function(req, res) {
    res.sendfile(publicDir + 'index.html');
});


// MONGO CONF.
// =============================================================================
var mongoConfigParser = require('./lib/mongoConfigParser');

var mongoConn = new mongoConfigParser()
  .setEnvDir( rootDir + 'db/mongo/env' )
  .getConnectionString();

// connect
mongoose.connect(mongoConn);



// API ROUTES
// =============================================================================

var router = express.Router();

// middleware to use for all requests
router.use(function(req, res, next) {
  next(); // make sure we go to the next routes and don't stop here
});

// test route to make sure everything is working (accessed at GET http://localhost:PORT/api)
router.get('/', function(req, res) {
  res.json({ message: 'hooray! welcome to our api!' });
});

{'fraction_non_alphanumeric': 0.2769644457723334, 'fraction_numerical': 0.004182850313713774, 'mean_word_length': 3.9895678092399405, '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': '990107', 'n_tokens_mistral': 971, 'n_tokens_neox': 928, 'n_words': 272}