mirror of
https://github.com/nioc/xmpp-bot.git
synced 2024-11-12 21:06:50 +01:00
24 lines
490 B
JavaScript
24 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()
|
||
|
}
|