<commit_before>import express from 'express';
import beautify from 'express-beautify';
import url from 'url';
import path from 'path';
import React from 'react';
import ReactDOMServer from 'react-dom/server';

const app = express();
app.use(beautify());
app.use('/client', express.static('lib/client'));

app.get('*', (req, res, next) => {
    const { pathname, query: { pretty } } = url.parse(req.url, true);
    const { default: loadPage } = require('./' + path.join('pages/', pathname));

    loadPage(req, res, (Page, pageActions) => {
        const send = (pretty ? res.sendHTML : res.send).bind(res);
        send(ReactDOMServer.renderToStaticMarkup(<Page />));
    });
});

const server = app.listen(3000, () => {
    console.log('Listening on port 3000');
    console.log('');

    console.log('Hello World: http://localhost:3000/hello');
    console.log('Redux-based Counter: http://localhost:3000/counter-redux');
    console.log('Fluxible-based Counter: http://localhost:3000/counter-redux');
    console.log('');

    console.log('Querystring options available for all pages:');
    console.log('    to = Either the name to say hello to or the number to initially count to');
    console.log('    template = Page template to use: basic (default), header');
    console.log('    username = Username to show in the Header template');
    console.log('');<commit_msg>Don't let errors surface from favicon requests<commit_after>import express from 'express';
import beautify from 'express-beautify';
import url from 'url';
import path from 'path';
import React from 'react';
import ReactDOMServer from 'react-dom/server';

const app = express();
app.use(beautify());
app.use('/client', express.static('lib/client'));

app.get('/favicon.ico', (req, res, next) => {
    res.send();
});

app.get('*', (req, res, next) => {
    const { pathname, query: { pretty } } = url.parse(req.url, true);
    const { default: loadPage } = require('./' + path.join('pages/', pathname));

    loadPage(req, res, (Page, pageActions) => {
        const send = (pretty ? res.sendHTML : res.send).bind(res);
        send(ReactDOMServer.renderToStaticMarkup(<Page />));
    });
});

const server = app.listen(3000, () => {
    console.log('Listening on port 3000');
    console.log('');

    console.log('Hello World: http://localhost:3000/hello');
    console.log('Redux-based Counter: http://localhost:3000/counter-redux');
    console.log('Fluxible-based Counter: http://localhost:3000/counter-redux');
    console.log('');

    console.log('Querystring options available for all pages:');
    console.log('    to = Either the name to say hello to or the number to initially count to');
    console.log('    template = Page template to use: basic (default), header');
    console.log('    username = Username to show in the Header template');
    console.log('');
{'fraction_non_alphanumeric': 0.17110799438990182, 'fraction_numerical': 0.014025245441795231, 'mean_word_length': 3.93598615916955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '3260755', 'n_tokens_mistral': 899, 'n_tokens_neox': 846, 'n_words': 240}