<commit_before>var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var fs = require('fs');
var elasticsearch = require('elasticsearch');

var client = new elasticsearch.Client({
	host: 'localhost:9200',
	log: 'trace'
});

app.use(express.static('public'));

app.get('*', function(req, res){
	res.send(fs.readFileSync('index.html', { encoding: 'utf8' }));
});

io.on('connection', function(socket){
	socket.on('flux_action', function(payload) {
		socket.broadcast.emit('flux_action', payload);

		client.create({
			index: 'fluxocket-chats',
			type: 'chats',
			body: payload
		}, function (error, response) {
			console.log(error, response);
		});
	});
});

http.listen(3000, function(){
	console.log('listening on *:3000');
});<commit_msg>Changes port to pick from env<commit_after>var express = require('express');
var app = express();
var http = require('http').Server(app);
var io = require('socket.io')(http);
var fs = require('fs');
var elasticsearch = require('elasticsearch');

var client = new elasticsearch.Client({
	host: 'localhost:9200',
	log: 'trace'
});

app.use(express.static('public'));

app.get('*', function(req, res){
	res.send(fs.readFileSync('index.html', { encoding: 'utf8' }));
});

io.on('connection', function(socket){
	socket.on('flux_action', function(payload) {
		socket.broadcast.emit('flux_action', payload);

		client.create({
			index: 'fluxocket-chats',
			type: 'chats',
			body: payload
		}, function (error, response) {
			console.log(error, response);
		});
	});
});

http.listen(process.env.PORT || 3000, function(){
	console.log('listening on *:3000');
});
{'fraction_non_alphanumeric': 0.20500595947556616, 'fraction_numerical': 0.015494636471990465, 'mean_word_length': 5.55859375, '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': '7638666', 'n_tokens_mistral': 601, 'n_tokens_neox': 555, 'n_words': 118}