<commit_before>var express = require("express");
var app = express();
app.use(express.logger());

app.get('/', function(request, response) {
  response.send('Hello World!');
});

var port = process.env.PORT || 5000;
app.listen(port, function() {
  console.log("Listening on " + port);
});<commit_msg>pg test connection<commit_after>var express = require("express");
var app = express();

var pg = require('pg');

var db_connection;
var db_done;

pg.connect(process.env.DATABASE_URL, function(err, connection, done) {
  if(err) {
    done();
    return console.error(err);
  }

  db_connection = connection;
  console.log('db connected');

  db_done = done;

});

app.use(express.logger());

app.get('/', function(request, response) {
  response.send('Hello World!');
});

app.get('/users', function(request, response) {
  db_connection.query('SELECT * FROM users;', function (error, result) {
    response.writeHead(200, {
        'Content-Type': 'text/html; charset=utf-8'
    });
    response.end(JSON.stringify(result.rows));
  });
});

app.get('/locations', function(request, response) {
  db_connection.query('SELECT * FROM locations;', function (error, result) {
    response.writeHead(200, {
        'Content-Type': 'text/html; charset=utf-8'
    });
    response.end(JSON.stringify(result.rows));
  });
});

app.get('/maps', function(request, response) {
  response.send('<img src="http://maps.googleapis.com/maps/api/staticmap?center=49.861227,23.923500&zoom=14&size=200x200&sensor=false&maptype=satellite">');
});

var port = process.env.PORT || 5000;
app.listen(port, function() {
  console.log("Listening on " + port);
});
{'fraction_non_alphanumeric': 0.19277845777233782, 'fraction_numerical': 0.02447980416156671, 'mean_word_length': 4.7368421052631575, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '2504821', 'n_tokens_mistral': 570, 'n_tokens_neox': 537, 'n_words': 98}