<commit_before><commit_msg>add basic proxy server<commit_after>#!/usr/bin/env node

import http from 'http';
import https from 'https';
import connect from 'connect';
import httpProxy from 'http-proxy';
import proxyInjector from './lib/proxy-injector';

const app = connect();

const proxy = httpProxy.createProxyServer({
   target: 'https://nodejs.org',
   agent: https.globalAgent,
   headers: { host: 'nodejs.org' },
})

app.use(proxyInjector('test/test.js'));

app.use((req, res) => {
  proxy.web(req, res);
);

http.createServer(app).listen(8000);
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.007246376811594203, 'mean_word_length': 5.144444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '1819930', 'n_tokens_mistral': 186, 'n_tokens_neox': 183, 'n_words': 44}