2019-10-13 03:38:25 +02:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
// create default logger
|
|
|
|
let logger = require('./logger')()
|
|
|
|
|
|
|
|
// get configuration
|
|
|
|
let config = require('./config')(logger)
|
|
|
|
|
|
|
|
// update logger with configuration
|
|
|
|
logger.updateConfig(config.logger)
|
|
|
|
|
2019-11-23 20:39:22 +01:00
|
|
|
// output application version
|
|
|
|
const { name, version } = require('./../package.json')
|
|
|
|
logger.info(`Start ${name} service - version ${version}`)
|
|
|
|
|
2019-10-13 03:38:25 +02:00
|
|
|
// load xmpp module
|
|
|
|
const xmpp = require('./xmpp')(logger, config)
|
|
|
|
|
|
|
|
// load webhook module
|
2019-10-20 17:36:09 +02:00
|
|
|
require('./webhook')(logger, config, xmpp)
|
2019-10-13 03:38:25 +02:00
|
|
|
|
|
|
|
// handle error and process ending
|
|
|
|
require('./error')(logger, xmpp)
|