This commit is contained in:
2026-05-13 19:58:16 +03:00
commit f5adeb292b
78 changed files with 12024 additions and 0 deletions

32
lib/modules/start.js Normal file
View File

@@ -0,0 +1,32 @@
const datafile = require('../datafile')
//
// Initialize the child logger for
// the module
//
const log = require('../log').child({
module: 'start'
})
module.exports = function(context) {
log.info('connecting to jabber')
//
// Connect to the jabber database
//
return context.jabber.connect(context.config)
.then(function() {
log.info(`creating file '${context.config.target.filename}'`)
//
// Create the datafile and add
// it to the context
//
context.output = datafile(
context.config.target.filename,
process.exit
)
//
// Resolve the promise
//
return context
})
}