index.js
764 Bytes
var fs = require('fs');
var ini = require('ini');
var expresso = require('sate24-expresso');
var config = ini.parse(fs.readFileSync(__dirname + '/config.ini', 'utf-8'));
process.chdir(__dirname);
var logger = require('sate24/logger.js').start();
var HttpServer = require('sate24/httpserver.js');
var aaa = require('sate24/aaa.js');
var partner = require('sate24/partner-im.js');
var imAdaptor = require('./adaptor-ym');
var matrix = aaa.prepareMatrix();
var options = {
'aaa': aaa,
'logger': logger,
'config': config,
'matrix': matrix,
'partner': partner,
'imAdaptor': imAdaptor
}
var httpServer = HttpServer.start(config, options);
aaa.pause();
partner.start(options);
aaa.start(config, partner, options);
expresso.start(options);