<commit_before>'use strict';

const socketio = require('socket.io');

const HuglaLogger = require('hugla-logger');

/**
 * HuglaSocketIO - Hugla web framework's socket.io module
 */
class HuglaSocketIO {

  /**
   * Class constructor
   */
  constructor(app) {
    this.config = app.config.socketio || {};
    this.log = new HuglaLogger({ module: 'socket.io' });

    const http = app.getModule('hugla-http');
    http.addMiddlewareSetupAction(this.middlewareSetup.bind(this));
  }

  middlewareSetup(app, http) {
    const log = this.log;
    const io = this.io = socketio(http);

    io.on('connection', function(socket) {
      log.info('static route [%s : %s]', uri, dir);
    });
  }
}
<commit_msg>exporting main library class<commit_after>'use strict';

const socketio = require('socket.io');

const HuglaLogger = require('hugla-logger');

/**
 * HuglaSocketIO - Hugla web framework's socket.io module
 */
class HuglaSocketIO {

  /**
   * Class constructor
   */
  constructor(app) {
    this.config = app.config.socketio || {};
    this.log = new HuglaLogger({ module: 'socket.io' });

    const http = app.getModule('hugla-http');
    http.addMiddlewareSetupAction(this.middlewareSetup.bind(this));
  }

  middlewareSetup(app, http) {
    const log = this.log;
    const io = this.io = socketio(http);

    io.on('connection', function(socket) {
      log.info('static route [%s : %s]', uri, dir);
    });
  }
}

module.exports = HuglaSocketIO;

{'fraction_non_alphanumeric': 0.16024759284731774, 'fraction_numerical': 0.0, 'mean_word_length': 3.44954128440367, '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': '4402792', 'n_tokens_mistral': 488, 'n_tokens_neox': 479, 'n_words': 99}