<commit_before>'use strict';

// Express Related Library
var express = require('express');
var session = require('express-session');
var bodyParser = require('body-parser');
var browserify = require('connect-browserify');

// Passport Library
var passport = require('passport');

// React Related Library
var reactify = require('reactify');
var nodeJsx = require('node-jsx');

nodeJsx.install({extension: '.jsx'});

// App middleware setting
var app = express();
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use(session({secret: 'keyboard cat'}));
// Initialize Passport!  Also use passport.session() middleware, to support
// persistent login sessions (recommended).
app.use(passport.initialize());
app.use(passport.session());
app.use(express.static(__dirname + '/../client/public'));

// Register Route and Bundle.js
var apiRoute = require('./routes/api');
app.use('/api', apiRoute)
  .use('/bundle.js', browserify.serve({
    entry: __dirname + '/../client/app/main',
    debug: true,
    watch: true,
    transforms: [reactify]
  }));

// Start application
var port = process.env.PORT || 8080;
app.listen(port);

console.log('Magic happens on port ' + port);
<commit_msg>use path.join to normalize path<commit_after>'use strict';

var path = require('path');

// Express Related Library
var express = require('express');
var session = require('express-session');
var bodyParser = require('body-parser');
var browserify = require('connect-browserify');

// Passport Library
var passport = require('passport');

// React Related Library
var reactify = require('reactify');
var nodeJsx = require('node-jsx');

nodeJsx.install({extension: '.jsx'});

// App middleware setting
var app = express();
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.use(session({secret: 'keyboard cat'}));
// Initialize Passport!  Also use passport.session() middleware, to support
// persistent login sessions (recommended).
app.use(passport.initialize());
app.use(passport.session());
app.use(express.static(path.join(__dirname, '../client/public')));

// Register Route and Bundle.js
var apiRoute = require('./routes/api');
app.use('/api', apiRoute)
  .use('/bundle.js', browserify.serve({
    entry: path.join(__dirname, '../client/app/main'),
    debug: true,
    watch: true,
    transforms: [reactify]
  }));

// Start application
var port = process.env.PORT || 8080;
app.listen(port);

console.log('Magic happens on port ' + port);

{'fraction_non_alphanumeric': 0.17543155359293455, 'fraction_numerical': 0.003211561621838619, 'mean_word_length': 4.919239904988124, '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': '6134870', 'n_tokens_mistral': 757, 'n_tokens_neox': 743, 'n_words': 193}