<commit_before>'use strict';
import * as socketio from 'socket.io';
import * as http from 'http';
import * as socketAuth from './client_socket_auth';
import * as template from './dev_client_templates';
import * as rsp from './redis_sub_pool';

export const socketIOChannel = 'app-event';
export const redisPrefix = socketIOChannel;

var httpServer: http.Server;
var socketIOServer: SocketIO.Server;
var redisSubPool: rsp.RedisSubPool;

export function createHttpServer(): http.Server {
  return http.createServer(function (req: http.ServerRequest, res: http.ServerResponse): void {
    res.write(template.clientTemplate(socketIOChannel, template.authMessageTemplate));
    res.end();
  });
}

export function createRedisSubPool(): rsp.RedisSubPool {
  var newRedisSubPool = new rsp.RedisSubPool();

  var client = newRedisSubPool.addClient('redis://192.168.33.10/3');

  newRedisSubPool.lock();
  return newRedisSubPool;
}

export function createSocketIOServer(httpServer: http.Server): SocketIO.Server {
  return socketio(httpServer);
}<commit_msg>Fixed syntax createHttpServer at src/app.ts<commit_after>'use strict';
import * as socketio from 'socket.io';
import * as http from 'http';
import * as socketAuth from './client_socket_auth';
import * as template from './dev_client_templates';
import * as rsp from './redis_sub_pool';

export const socketIOChannel = 'app-event';
export const redisPrefix = socketIOChannel;

var httpServer: http.Server;
var socketIOServer: SocketIO.Server;
var redisSubPool: rsp.RedisSubPool;

export function createHttpServer(): http.Server {
  return http.createServer(function(req: http.ServerRequest, res: http.ServerResponse): void {
    res.write(template.clientTemplate(socketIOChannel, template.authMessageTemplate));
    res.end();
  });
}

export function createRedisSubPool(): rsp.RedisSubPool {
  var newRedisSubPool = new rsp.RedisSubPool();

  var client = newRedisSubPool.addClient('redis://192.168.33.10/3');

  newRedisSubPool.lock();
  return newRedisSubPool;
}

export function createSocketIOServer(httpServer: http.Server): SocketIO.Server {
  return socketio(httpServer);
}
{'fraction_non_alphanumeric': 0.11659614480488951, 'fraction_numerical': 0.010343206393982134, 'mean_word_length': 5.734177215189874, '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': '555932', 'n_tokens_mistral': 671, 'n_tokens_neox': 657, 'n_words': 161}