<commit_before>var express = require('express')
  , http = require('http')
  , path = require('path');

var app = express();

// all environments
app.set('port', process.env.PORT || 3000);
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}


// handles request to /
var indexHandler = function(req, res) {
    res.send("hi there!");
}

app.get('/', indexHandler);

http.createServer(app).listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});
<commit_msg>included node-mysql lib, started implementing route handler func<commit_after>var express = require('express')
    , http = require('http')
    , path = require('path')
    , path = require('path')
    , mysql = require('mysql');

var mySQLConfiguration = {
    hostname:"localhost",
    database:"my-db",
    user: "root",
    password: "",
    port: "3306"
};

var mysqlConnection = mysql.createConnection(mySQLConfiguration);

var app = express();

// all environments
app.set('port', process.env.PORT || 3000);
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

// development only
if ('development' == app.get('env')) {
  app.use(express.errorHandler());
}

// handles request (route: /)
var indexHandler = function(req, res) {

    var sql = 'SELECT * FROM test_table';

    // mysql.query() function takes nestedTables as an option parameter
    mysqlConnection.query({sql: sql, nestedTables: true }, function (err, rows) {

        // error handling
        if (err){
            console.log('Internal error: ', err);
            res.send("Mysql query execution error!");
        }

        else {
            res.send(rows);
        }

    });

}

app.get('/', indexHandler);

http.createServer(app).listen(app.get('port'), function(){
  console.log('Express server listening on port ' + app.get('port'));
});

{'fraction_non_alphanumeric': 0.1832797427652733, 'fraction_numerical': 0.005512172714745062, 'mean_word_length': 3.87248322147651, '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': '7066131', 'n_tokens_mistral': 673, 'n_tokens_neox': 653, 'n_words': 146}