index.js
771 Bytes
"use strict";
var aaa = require('sate24/aaa.js');
var expresso = require('sate24-expresso');
var logger = require('sate24/logger.js').start();
var HttpServer = require('sate24/httpserver.js');
var partner = require('./partner-komodo.js');
var fs = require('fs');
var ini = require('ini');
var config = ini.parse(fs.readFileSync(__dirname + '/config.ini', 'utf-8'));
process.chdir(__dirname);
var logDirectory = __dirname + '/logs';
fs.existsSync(logDirectory) || fs.mkdirSync(logDirectory);
var matrix = aaa.prepareMatrix();
var options = {
'aaa': aaa,
'logger': logger,
'config': config,
'matrix': matrix,
}
var httpServer = HttpServer.start(config, options);
partner.start(options);
aaa.start(config, partner, options);
expresso.start(options);