<commit_before>"use strict";
const http = require('http');
const express = require('express');
const path = require('path');
const websockets = require('./websockets');

const app = express();
const httpServer = http.createServer(app);
const wsServer = websockets.create(httpServer);
websockets.configure(wsServer);

const port = process.env.PORT || 3000;
app.use('/api/v1', require('./api'));

app.route('/static/*')
    .get((req, res) => {
    const referer = req.get('Referer');
    if (referer.includes('/kwizmeestert')) {
        res.sendFile(path.join(__dirname, 'kwizmeestert/build', req.path));
    }
    else if (referer.includes('/team')) {
        res.sendFIle(path.join(__dirname, 'team/build', req.path));
    }
    else if (referer.includes('/scorebord')) {
        res.sendFile(path.join(__dirname, 'scoreboard/build'));
    }});


app.route('/team')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, "team/build/index.html"));
    });

app.route('/scorebord')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, "scorebord/build/index.html"));
    });

app.route('/kwizmeestert')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, "kwizmeestert/build/index.html"));
    });

app.route('/')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, 'index.html'));
    });

app.route('/*')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, 'index.html'));
    });

app.listen(port, () => {
    console.log("Server started and listening to ::" + port);
});<commit_msg>Added /test route<commit_after>"use strict";
const http = require('http');
const express = require('express');
const path = require('path');
const websockets = require('./websockets');

const app = express();
const httpServer = http.createServer(app);
const wsServer = websockets.create(httpServer);
websockets.configure(wsServer);

const port = process.env.PORT || 3000;
app.use('/api/v1', require('./api'));

app.route('/static/*')
    .get((req, res) => {
    const referer = req.get('Referer');
    if (referer.includes('/kwizmeestert')) {
        res.sendFile(path.join(__dirname, 'kwizmeestert/build', req.path));
    }
    else if (referer.includes('/team')) {
        res.sendFIle(path.join(__dirname, 'team/build', req.path));
    }
    else if (referer.includes('/scorebord')) {
        res.sendFile(path.join(__dirname, 'scoreboard/build'));
    }});

app.route('/team')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, "team/build/index.html"));
    });

app.route('/scorebord')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, "scorebord/build/index.html"));
    });

app.route('/kwizmeestert')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, "kwizmeestert/build/index.html"));
    });

app.route('/')
    .get((req, res) => {
        res.sendFile(path.join(__dirname, 'index.html'));
    });

// Test route
app.use(express.static(path.join(__dirname, 'tests')));


// app.route('/*')
//     .get((req, res) => {
//         res.sendFile(path.join(__dirname, 'index.html'));
//     });

app.listen(port, () => {
    console.log("Server started and listening to ::" + port);
});
{'fraction_non_alphanumeric': 0.21430802874101842, 'fraction_numerical': 0.003124023742580444, 'mean_word_length': 3.478321678321678, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '3765346', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1079, 'n_words': 174}