mirror of
https://github.com/nioc/xmpp-bot.git
synced 2024-11-09 19:51:24 +01:00
23 lines
490 B
JavaScript
23 lines
490 B
JavaScript
'use strict'
|
|
|
|
// create default logger
|
|
let logger = require('./logger')()
|
|
|
|
// get configuration
|
|
let config = require('./config')(logger)
|
|
|
|
// update logger with configuration
|
|
logger.updateConfig(config.logger)
|
|
|
|
// load xmpp module
|
|
const xmpp = require('./xmpp')(logger, config)
|
|
|
|
// load webhook module
|
|
const webhookListener = require('./webhook')(logger, config, xmpp)
|
|
|
|
// handle error and process ending
|
|
require('./error')(logger, xmpp)
|
|
|
|
exports.close = () => {
|
|
webhookListener.close()
|
|
}
|