<commit_before>// App requirements
var gw2nodelib = require("gw2nodelibvz");
var expressApp = require("express")();
var http = require("http").Server(expressApp);
var io = require("socket.io")(http);

// Heroku stuff
var port_number = process.env.PORT || 8000;

// Variables to hold the current values for each type of material in the trading post
var woods;
var ores;
var leathers;
var scraps;

// Variables to control wood & ores
var woodReady = false;
var oreReady = false;

// Since the gw2 trading post cuts 15% of every sale our profit will only be 85%
var profit = 0.85;

// Returns index page on request
expressApp.get("/", function(req, res){
	res.sendFile("index.html", {root: __dirname});
});

// When someone connects to the server it gets the current prices
io.on("connection", function(socket){
	woodReady = false;
	oreReady = false;<commit_msg>fixed a "bug" with heroku doesnt natively supporting websockets<commit_after>// App requirements
var gw2nodelib = require("gw2nodelibvz");
var expressApp = require("express")();
var http = require("http").Server(expressApp);
var io = require("socket.io")(http);

// Heroku stuff
var port_number = process.env.PORT || 8000;

io.configure(function () {
  io.set("transports", ["xhr-polling"]);
  io.set("polling duration", 10);
});

// Variables to hold the current values for each type of material in the trading post
var woods;
var ores;
var leathers;
var scraps;

// Variables to control wood & ores
var woodReady = false;
var oreReady = false;

// Since the gw2 trading post cuts 15% of every sale our profit will only be 85%
var profit = 0.85;

// Returns index page on request
expressApp.get("/", function(req, res){
	res.sendFile("index.html", {root: __dirname});
});

// When someone connects to the server it gets the current prices
io.on("connection", function(socket){
	woodReady = false;
	oreReady = false;
{'fraction_non_alphanumeric': 0.12746666666666667, 'fraction_numerical': 0.016, 'mean_word_length': 4.633633633633633, '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': '1139025', 'n_tokens_mistral': 599, 'n_tokens_neox': 568, 'n_words': 217}