<commit_before>var path = require('path');
var express = require('express');
var app = express();

var server = app.listen(process.env.PORT || 3000, process.env.IP || "0.0.0.0");
var io = require('socket.io').listen(server);

app.configure(function(){
    app.use(express.static(path.resolve(__dirname, 'game')));
});

io.on('connection', function (socket) {
    var dealer1 = 0,
        dealer2 = 0,
        player1 = 0,
        player2 = 0;

    socket.on('action', function (data) {
        switch (data.action){
            case 'dd':
                dealer1++;
                break;
            case 'hit':
                player1++;
                break;
            case 'split':
                player2++;
                break;
            case 'stand':
                dealer2++;
            break;
            case 'surrender':
                break;
            default:
        }

        socket.emit('action', {
            dealer1: dealer1,
            dealer2: dealer2,
            player1: player1,
            player2: player2
        });
    });
});

var requirejs = require('requirejs');
requirejs.config({
    nodeRequire: require
});<commit_msg>Changes with express and sockets<commit_after>var requirejs = require('requirejs');
requirejs.config({
    nodeRequire: require
});

var path = require('path');
var express = require('express');
var app = express();

var server = app.listen(process.env.PORT || 3000, process.env.IP || "0.0.0.0");
var io = require('socket.io').listen(server);

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

io.on('connection', function(socket) {
    var dealer1 = 0,
        dealer2 = 0,
        player1 = 0,
        player2 = 0;

    socket.on('action', function(data) {
        switch (data.action) {
            case 'dd':
                dealer1++;
                break;
            case 'hit':
                player1++;
                break;
            case 'split':
                player2++;
                break;
            case 'stand':
                dealer2++;
                break;
            case 'surrender':
                break;
            default:
        }

        socket.emit('action', {
            dealer: {
                card1: dealer1,
                card2: dealer2
            },
            player: {
                card1: player1,
                card2: player2
            }
        });
    });
});
{'fraction_non_alphanumeric': 0.1371571072319202, 'fraction_numerical': 0.023275145469659187, 'mean_word_length': 1.4586312563840653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1711388', 'n_tokens_mistral': 691, 'n_tokens_neox': 657, 'n_words': 149}