<commit_before>'use strict';

var http = require('http').Server();
var io = require('socket.io')(http);
var _ = require('lodash');
var uuid = require('node-uuid');
var r = require('rethinkdb');

// Set default port to 3000
var port = 3000;



// Set default node environment to development
process.env.NODE_ENV = process.env.NODE_ENV || 'development';

if( process.env.NODE_ENV === 'production') {
  port = 80;
}



var dbconn, table;

// get the whiteboards from the db
var getWhiteboards = function(callback) {
	table
		.pluck('id', 'name')
		.run(dbconn, function(err, cursor) {
			cursor.toArray(function(err, whiteboards) {
				callback(whiteboards);
			});
		});
}

var sendWhiteboards = function(socket, type, callback) {
	getWhiteboards( function(whiteboards) {
		console.log('Sending ' + whiteboards.length + ' whiteboards.');
		// send the whiteboard list to all connected clients
		if(type === 'reply')<commit_msg>changed production port to 9000<commit_after>'use strict';

var http = require('http').Server();
var io = require('socket.io')(http);
var _ = require('lodash');
var uuid = require('node-uuid');
var r = require('rethinkdb');

// Set default port to 3000
var port = 3000;



// Set default node environment to development
process.env.NODE_ENV = process.env.NODE_ENV || 'development';

if( process.env.NODE_ENV === 'production') {
  port = 9000;
}



var dbconn, table;

// get the whiteboards from the db
var getWhiteboards = function(callback) {
	table
		.pluck('id', 'name')
		.run(dbconn, function(err, cursor) {
			cursor.toArray(function(err, whiteboards) {
				callback(whiteboards);
			});
		});
}

var sendWhiteboards = function(socket, type, callback) {
	getWhiteboards( function(whiteboards) {
		console.log('Sending ' + whiteboards.length + ' whiteboards.');
		// send the whiteboard list to all connected clients
		if(type === 'reply')
{'fraction_non_alphanumeric': 0.1518716577540107, 'fraction_numerical': 0.013903743315508022, 'mean_word_length': 4.423188405797101, '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': '6448054', 'n_tokens_mistral': 643, 'n_tokens_neox': 584, 'n_words': 161}