<commit_before>// Port will be assigned automatically by the Azure Web App (process.env.port). For localhost debugging, we use 8080.
// You can use the built-in VS Code debugger to test the solution locally.
var port = process.env.port || 8080;
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var azure = require('azure');

server.listen(port);

app.get('/', function (req, res) {
    console.log("going to load index.html");
    res.sendFile(__dirname + '/index.html');
});

// Service Bus Connection string is retrieved from the app env app settings
/*var serviceBusService = azure.createServiceBusService(process.env.AZURE_SERVICEBUS_ACCESS_KEY);

// Listener function to pull the Azure service bus and see if a new messages are available
setInterval(function () {
    serviceBusService.recieveQueueMessages('news', function (error, message) {
        if (!error) {
            // Message received and deleted (default behavior of the service bus)
            console.log(message);

            // Broadcast to all connected clients
            io.emit('item:added', message);
        }
    });
}, 5);*/<commit_msg>update to server.js file<commit_after>// Port will be assigned automatically by the Azure Web App (process.env.port). For localhost debugging, we use 8080.
// You can use the built-in VS Code debugger to test the solution locally.
var port = process.env.port || 8080;
var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);
var azure = require('azure');

server.listen(port);

app.get('/', function (req, res) {
    console.log("going to load index.html");
    res.sendFile(__dirname + '/index.html');
});

// Service Bus Connection string is retrieved from the app env app settings
var serviceBusService = azure.createServiceBusService(process.env.AZURE_SERVICEBUS_ACCESS_KEY);

// Listener function to pull the Azure service bus and see if a new messages are available
setInterval(function () {
    serviceBusService.recieveQueueMessages('news', function (error, message) {
        if (!error) {
            // Message received and deleted (default behavior of the service bus)
            console.log(message);

            // Broadcast to all connected clients
            io.emit('item:added', message);
        }
    });
}, 5);
{'fraction_non_alphanumeric': 0.12094395280235988, 'fraction_numerical': 0.007585335018963337, 'mean_word_length': 3.5566218809980805, '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': '6973567', 'n_tokens_mistral': 658, 'n_tokens_neox': 633, 'n_words': 232}