<commit_before>"use strict";
const port = process.env.PORT || 3000;

const express = require('express');
const bodyParser = require('body-parser');

const app = express();
app.use(bodyParser.urlencoded({ extended: false } ));
app.use(express.static('static'));

const server = app.listen(port, () => {
  console.log('Listening on *:' + port);
});

const io = require('socket.io')(server);
io.on('connection', function(socket){
  socket.on('room', room => {
    socket.join(room);
    console.log('join', room)
  });
  socket.on('uploadFrame', msg => {
    socket.broadcast.to(msg.room).emit('downloadFrame', msg);
  });
});

app.get(['/<:room>', '/'], (req, res) => {
  res.sendFile(__dirname + '/views/index.html');
});<commit_msg>fix server<commit_after>"use strict";
const port = process.env.PORT || 3000;

const express = require('express');
const bodyParser = require('body-parser');

const app = express();
app.use(bodyParser.urlencoded({ extended: false } ));
app.use(express.static('static'));

const server = app.listen(port, () => {
  console.log('Listening on *:' + port);
});

const io = require('socket.io')(server);
io.on('connection', function(socket){
  socket.on('room', room => {
    socket.join(room);
    console.log('join', room)
  });
  socket.on('uploadFrame', msg => {
    socket.broadcast.to(msg.room).emit('downloadFrame', msg);
  });
});

app.get(['/:room', '/'], (req, res) => {
  res.sendFile(__dirname + '/views/index.html');
});
{'fraction_non_alphanumeric': 0.227553118574366, 'fraction_numerical': 0.0054832076764907475, 'mean_word_length': 4.7936507936507935, 'pattern_counts': {'":': 0, '<': 4, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7071945', 'n_tokens_mistral': 488, 'n_tokens_neox': 481, 'n_words': 89}