<commit_before>// BASE SETUP
// ==============================

// CALL THE PACKAGES ------------
var express      = require("express"); // call express
var app          = express(); //define our app using express
var bodyParser   = require("body-parser"); // get the body-parser
var morgan       = require("morgan"); // used to see requests
var config       = require("./config");
var path         = require("path");


// APP CONFIGURATION ------------
// use body parse so we can grab information from POST requests
app.use(bodyParser.urlencoded({ extended: true}));
app.use(bodyParser.json());

// configure our app to handle CORS requests
app.use(function( req, res, next) {
    res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Access-Control-Allow-Methods', 'GET, POST');
    res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type, Authorization');
    next();
});

//log all request to the console
app.use(morgan('dev'));

// set static files location
app.use(express.static(__dirname + '/public'));

// ROUTES FOR OUR API
// ============================
// ADD API ROUTES HERE
var apiRoutes = require("./app/routes/api")(app, express);
app.use('/api', apiRoutes);

// ROUTE TO SERVE SONG FILE
app.get('/s/:songid', function(req, res) {
	res.sendFile(path.join(__dirname + '/public/s/' + req.params.songid + '/song.mp3'));
});


// MAIN CATCHALL ROUTE ------------
// SEND USERS TO FRONTEND ---------
app.get('*', function(req, res) {
    res.sendFile(path.join(__dirname + '/public/app/views/index.html'));
});

// START SERVER
// ================================
app.listen(config.port);<commit_msg>Added new dbug message to get pid<commit_after>// BASE SETUP
// ==============================

// CALL THE PACKAGES ------------
var express      = require("express"); // call express
var app          = express(); //define our app using express
var bodyParser   = require("body-parser"); // get the body-parser
var morgan       = require("morgan"); // used to see requests
var config       = require("./config");
var path         = require("path");


// APP CONFIGURATION ------------
// use body parse so we can grab information from POST requests
app.use(bodyParser.urlencoded({ extended: true}));
app.use(bodyParser.json());

// configure our app to handle CORS requests
app.use(function( req, res, next) {
    res.setHeader('Access-Control-Allow-Origin', '*');
    res.setHeader('Access-Control-Allow-Methods', 'GET, POST');
    res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type, Authorization');
    next();
});

//log all request to the console
app.use(morgan('dev'));

// set static files location
app.use(express.static(__dirname + '/public'));

// ROUTES FOR OUR API
// ============================
// ADD API ROUTES HERE
var apiRoutes = require("./app/routes/api")(app, express);
app.use('/api', apiRoutes);

// ROUTE TO SERVE SONG FILE
app.get('/s/:songid', function(req, res) {
	res.sendFile(path.join(__dirname + '/public/s/' + req.params.songid + '/song.mp3'));
});


// MAIN CATCHALL ROUTE ------------
// SEND USERS TO FRONTEND ---------
app.get('*', function(req, res) {
    res.sendFile(path.join(__dirname + '/public/app/views/index.html'));
});

// START SERVER
// ================================
app.listen(config.port);
console.log('This process is your pid ' + process.pid);
{'fraction_non_alphanumeric': 0.2381516587677725, 'fraction_numerical': 0.0005924170616113745, 'mean_word_length': 3.3574193548387097, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3125084', 'n_tokens_mistral': 1038, 'n_tokens_neox': 1001, 'n_words': 267}