<commit_before>const express = require('express');
const app = express();
const port = process.env.PORT || 8080;
const api = require('./routes/api');
const bodyParser = require('body-parser');
const session = require('express-session');

app.use(express.static('public'));
app.use(express.static('public/views'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(session({secret: 'ayylmao'}));
require('./src/config/passport')(app);

app.use('/', api);



if (!module.parent) {
    app.listen(port, function(err) {
        if (err) {
          console.log(err);
        }
        console.log('running server on port ' + port);
    });
}

// development error handler
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.json({
      message: err.message,
      error: err
    });<commit_msg>testing refactor<commit_after>const express = require('express');
const app = express();
const port = process.env.PORT || 8080;
const api = require('./routes/api');
const bodyParser = require('body-parser');
const session = require('express-session');

app.use(express.static('public'));
app.use(express.static('public/views'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(session({secret: 'ayylmao'}));
require('./src/config/passport')(app);

app.use('/', api);

if (!module.parent) {
    app.listen(port, function(err) {
        if (err) {
          console.log(err);
        }
        console.log('running server on port ' + port);
    });
}

// development error handler
if (app.get('env') === 'development') {
  app.use(function(err, req, res, next) {
    res.status(err.status || 500);
    res.json({
      message: err.message,
      error: err
    });
{'fraction_non_alphanumeric': 0.19701162147205312, 'fraction_numerical': 0.00774764803541782, 'mean_word_length': 3.7578947368421054, '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': '6209239', 'n_tokens_mistral': 585, 'n_tokens_neox': 576, 'n_words': 119}