<commit_before>import express = require('express');
import path = require('path');

var port:number = process.env.PORT || 3000;

var app = express(),
    server = app.listen(port),
    io = require('socket.io')(server),
    Twit = require('twit');


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

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

var T = new Twit({
        consumer_key: '8hVWeqjGoHvVo75vM5zw9R0gw',
        consumer_secret: '<KEY>',
        access_token: '<KEY>',
        access_token_secret: '<KEY>'
    }),
    stream = null, // Define global stream holder as we will only ever have ONE active stream
    currentKeyword = null, // Hold the current keyword we are streaming
    currentSockets = 0; // Counter to determine number of open sockets



io.sockets.on('connection', function (socket) {
    currentSockets++;
    socket.emit('connected', currentKeyword);

    console.log('Socket Connected');

    if (currentKeyword !== null && stream === null) {
        stream = createStream(currentKeyword);
    }

    socket.on('disconnect', function () {
        currentSockets--;<commit_msg>change server config<commit_after>import express = require('express');
import path = require('path');

var port:number = process.env.PORT || 3000;

var app = express(),
    server = app.listen(port),
    io = require('socket.io')(server),
    Twit = require('twit');


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

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

var T = new Twit({
        consumer_key: '8hVWeqjGoHvVo75vM5zw9R0gw',
        consumer_secret: '<KEY>',
        access_token: '<KEY>',
        access_token_secret: '<KEY>'
    }),
    stream = null, // Define global stream holder as we will only ever have ONE active stream
    currentKeyword = null, // Hold the current keyword we are streaming
    currentSockets = 0; // Counter to determine number of open sockets



io.sockets.on('connection', function (socket) {
    currentSockets++;
    socket.emit('connected', currentKeyword);

    console.log('Socket Connected');

    if (currentKeyword !== null && stream === null) {
        stream = createStream(currentKeyword);
    }

    socket.on('disconnect', function () {
        currentSockets--;
{'fraction_non_alphanumeric': 0.15795868772782504, 'fraction_numerical': 0.008910490076954233, 'mean_word_length': 3.6341463414634148, 'pattern_counts': {'":': 0, '<': 9, '<?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': '1254544', 'n_tokens_mistral': 756, 'n_tokens_neox': 739, 'n_words': 185}