xmpp-bot/lib/server.js

24 lines
561 B
JavaScript
Raw Normal View History

2019-10-13 03:38:25 +02:00
'use strict'
// create default logger
const logger = require('./logger')()
2019-10-13 03:38:25 +02:00
// get configuration
const config = require('./config')(logger)
2019-10-13 03:38:25 +02:00
// 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
require('./webhook')(logger, config, xmpp)
2019-10-13 03:38:25 +02:00
// handle error and process ending
require('./error')(logger, xmpp)