<commit_before>var server = require('http').createServer()
  , url = require('url')
  , WebSocketServer = require('ws').Server
  , wss = new WebSocketServer({ server: server })
  , express = require('express')
  , app = express()
  , port = 4080;

app.use(express.static(__dirname + '/public/'));
   


app.get('/client',function(req,res){
  res.sendFile(__dirname+'/public/index.html');
});

app.use(function (req, res) {
  res.send({ msg: "Server Initiated" });
});

wss.broadcast = function broadcast(data) {
  wss.clients.forEach(function each(client) {
    client.send(data);
  });
};


wss.on('connection', function connection(ws) {
  var location = url.parse(ws.upgradeReq.url, true);
  

  ws.on('message', function incoming(message) {
    console.log('received: %s', message);
    wss.broadcast(message);
  });

  ws.send('Data Came from Server');
});

server.on('request', app);
server.listen(port, function () { console.log('Listening on ' + server.address().port) });<commit_msg>Heroku<commit_after>var server = require('http').createServer()
  , url = require('url')
  , WebSocketServer = require('ws').Server
  , wss = new WebSocketServer({ server: server })
  , express = require('express')
  , app = express()
  , port = 4080;


app.set('port', (process.env.PORT || port));

app.use(express.static(__dirname + '/public/'));

app.get('/client',function(req,res){
  res.sendFile(__dirname+'/public/index.html');
});

app.use(function (req, res) {
  res.send({ msg: "Server Initiated" });
});

wss.broadcast = function broadcast(data) {
  wss.clients.forEach(function each(client) {
    client.send(data);
  });
};


wss.on('connection', function connection(ws) {
  var location = url.parse(ws.upgradeReq.url, true);
  

  ws.on('message', function incoming(message) {
    console.log('received: %s', message);
    wss.broadcast(message);
  });

  ws.send('Data Came from Server');
});

server.on('request', app);
server.listen(app.get('port'), function () { console.log('Listening on ' + server.address().port) });
{'fraction_non_alphanumeric': 0.19822485207100593, 'fraction_numerical': 0.0039447731755424065, 'mean_word_length': 4.513586956521739, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5843638', 'n_tokens_mistral': 693, 'n_tokens_neox': 670, 'n_words': 123}