<commit_before>var express = require('express');
var exphbs = require('express3-handlebars');
var path = require('path');
var http = require('http');

var app = express();

app.engine('hbs', exphbs({defaultLayout: 'main.hbs'}));
app.set('view engine', 'hbs');

app.use(express.static(path.join(__dirname, 'deps')));
app.use(express.static(path.join(__dirname, 'public')));

app.get('/evaluate', function (req, res) {
  http.get('http://ec2-204-236-174-221.us-west-1.compute.amazonaws.com?q=' + encodeURI(req.query.q), function (upstreamRes) {
    upstreamRes.pipe(res);
  }).on('error', function (error) {
    res.status(502).send(error.message);
  });
});

app.get('/', function (req, res) {
  res.render('home');
});

app.listen(3001, '127.0.0.1');<commit_msg>Also need to escape here<commit_after>var express = require('express');
var exphbs = require('express3-handlebars');
var path = require('path');
var http = require('http');

var app = express();

app.engine('hbs', exphbs({defaultLayout: 'main.hbs'}));
app.set('view engine', 'hbs');

app.use(express.static(path.join(__dirname, 'deps')));
app.use(express.static(path.join(__dirname, 'public')));

app.get('/evaluate', function (req, res) {
  http.get('http://ec2-204-236-174-221.us-west-1.compute.amazonaws.com?q=' + encodeURIComponent(req.query.q), function (upstreamRes) {
    upstreamRes.pipe(res);
  }).on('error', function (error) {
    res.status(502).send(error.message);
  });
});

app.get('/', function (req, res) {
  res.render('home');
});

app.listen(3001, '127.0.0.1');
{'fraction_non_alphanumeric': 0.22927461139896374, 'fraction_numerical': 0.03626943005181347, 'mean_word_length': 5.410788381742739, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6497375', 'n_tokens_mistral': 587, 'n_tokens_neox': 561, 'n_words': 93}