<commit_before>// Generated by CoffeeScript 1.9.3
var RealtimeAdapter, americano, application, commitPatch, initKonnectors, localization, log, params, poller;

americano = require('americano');

RealtimeAdapter = require('cozy-realtime-adapter');

localization = require('./server/lib/localization_manager');

initKonnectors = require('./server/init/konnectors');

poller = require('./server/lib/poller');

commitPatch = require('./server/init/patch_commits');

log = require('printit')({
  prefix: 'konnectors'
});

process.env.TZ = 'UTC';

params = {
  name: 'konnectors',
  port: process.env.PORT || 9358,
  host: process.env.HOST || '127.0.0.1',
  root: __dirname
};

application = module.exports = function(callback) {
  return americano.start(params, function(app, server) {
    var realtime;
    realtime = RealtimeAdapter(server, ['konnector.update', 'folder.*']);
    return localization.initialize(function() {
      return initKonnectors(function() {
        poller.start();
        log.info('Import poller started.');
        return commitPatch(function() {
          if (callback != null) {
            return callback(app, server);
          }
        });
      });
    });
  });
};

if (!module.parent) {
  application();
}<commit_msg>build<commit_after>// Generated by CoffeeScript 1.9.3
var RealtimeAdapter, americano, application, commitPatch, initKonnectors, localization, log, params, poller;

americano = require('americano');

RealtimeAdapter = require('cozy-realtime-adapter');

localization = require('./server/lib/localization_manager');

initKonnectors = require('./server/init/konnectors');

poller = require('./server/lib/poller');

commitPatch = require('./server/init/patch_commits');

log = require('printit')({
  prefix: 'konnectors'
});

process.env.TZ = 'UTC';

params = {
  name: 'konnectors',
  port: process.env.PORT || 9358,
  host: process.env.HOST || '127.0.0.1',
  root: __dirname
};

application = module.exports = function(callback) {
  return americano.start(params, function(app, server) {
    var realtime;
    realtime = RealtimeAdapter(server, ['konnector.update', 'folder.*']);
    return localization.initialize(function() {
      return initKonnectors(function() {
        poller.start();
        log.info('Import poller started.');
        if (callback != null) {
          return callback(app, server);
        }
      });
    });
  });
};

if (!module.parent) {
  application();
}
{'fraction_non_alphanumeric': 0.16228430566967955, 'fraction_numerical': 0.010682004930156122, 'mean_word_length': 3.8027613412228796, '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': '178393', 'n_tokens_mistral': 763, 'n_tokens_neox': 745, 'n_words': 150}