Find file History
Pull request Compare This branch is 3 commits behind superfeedr:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.markdown
disco_info.js
logger.js
offline.js
ping.js
presence.js
roster.js
router.js
s2s.js
vcard.js
version.js
websocket.js

README.markdown

Modules

Modules are at the heart of XMPP and this xmpp-server in node.js. The general approach is give a very strong power to all the modules.

HOW-TO

Each module is loaded when the server starts. Modules export only a single configure which is callbed with 2 params: the server itself and the configuration of this specific module (the general configuration file should include a object for each module).

Configuration

exports.config = { port: 5222, domain: 'zipline.local', tls: { keyPath: '/etc/xmpp-server/tls/localhost-key.pem', certPath: '/etc/xmpp-server/tls/localhost-cert.pem' } echo: { from: "echo@myserver.com" }

Then, your server will trigger Echo.configure(server, config.echo);

Implementation

Then, the module should be able to listen to events on the server, and each of the components of it, as well as objects passed as params to the events.