code: function(dist, options) {
  
    options = options || {};
    dist = dist || process.env.EJABBERD_DIST;
  
    if (!dist) {
      throw new Error('Arguments Error: You need to specify the os distribution, e.g ubuntu/osx ...');
    }
  
    if (!ADAPTERS[dist] && !options.dist) {
      throw new Error('Key Error: The dist name ' + dist+ ' not found in existing adapters');
    } else {
      this.dist = ADAPTERS[dist] || options.dist;
    }
  
    // .
    this.version = PACKAGE.version;
  
    return this.initialize(dist, options);
  }
docs: Ejabberd class