<commit_before>const express = require('express');
const path = require('path');
const request = require('request');
const cheerio = require('cheerio');
const app = express();

const db = require('../db/queries.js');
const utils = require('./utils.js');
const bodyParser = require('body-parser')

app.use(express.static(path.resolve(__dirname + '/../client/public')));

app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

app.get('/players', (req, res) => {
  console.log('req', req.query)
  db.getPlayers(req.query.team, req.query.position)
  .then(players => {
    res.end(JSON.stringify(players));
  })
  .catch(err => {
    console.log('error fetching players', err);
  })
})

app.listen(8080, () => {
  console.log('dir', __dirname);
});<commit_msg>Add prod port<commit_after>const express = require('express');
const path = require('path');
const request = require('request');
const cheerio = require('cheerio');
const app = express();

const db = require('../db/queries.js');
const utils = require('./utils.js');
const bodyParser = require('body-parser');

const port = process.env.PORT || 8080;

app.use(express.static(path.resolve(__dirname + '/../client/public')));

app.use(bodyParser.urlencoded({ extended: true }));
app.use(bodyParser.json());

app.get('/players', (req, res) => {
  console.log('req', req.query)
  db.getPlayers(req.query.team, req.query.position)
  .then(players => {
    res.end(JSON.stringify(players));
  })
  .catch(err => {
    console.log('error fetching players', err);
  })
})

app.listen(port, () => {
  console.log('dir', __dirname);
});
{'fraction_non_alphanumeric': 0.21219663970130678, 'fraction_numerical': 0.004978220286247666, 'mean_word_length': 4.784172661870503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '2078194', 'n_tokens_mistral': 535, 'n_tokens_neox': 530, 'n_words': 100}