lib/uploadServer.js
function GFSuploadServer(mongoose, port, ssloptions, routes, listen, defaultcallback, authcallback) {
  this.port = port;
  this.ssloptions = ssloptions;
  this.routes = routes;
  this.listen = listen;
  this.authcallback = authcallback;
  this.mongoose = mongoose;
  if(defaultcallback) {
    this.defaultcallback = defaultcallback;
  } else {
    this.defaultcallback = function(err, result, type, user) {

    }
  }
  this.registerServer(routes);
  return this;
}
function GFSuploadServer(mongoose, port, ssloptions, routes, listen, defaultcallback, authcallback) {
  this.port = port;
  this.ssloptions = ssloptions;
  this.routes = routes;
  this.listen = listen;
  this.authcallback = authcallback;
  this.mongoose = mongoose;
  if(defaultcallback) {
    this.defaultcallback = defaultcallback;
  } else {
    this.defaultcallback = function(err, result, type, user) {

    }
  }
  this.registerServer(routes);
  return this;
}
function GFSuploadServer ( mongoose , port , ssloptions , routes , listen , defaultcallback , authcallback ) { this . port = port ; this . ssloptions = ssloptions ; this . routes = routes ; this . listen = listen ; this . authcallback = authcallback ; this . mongoose = mongoose ; if ( defaultcallback ) { this . defaultcallback = defaultcallback ; } else { this . defaultcallback = function ( err , result , type , user ) { } } this . registerServer ( routes ) ; return this ; }
Constructor for the module class

@this {GFSuploadServer}

@constructor
@param {Object} mongoose The mongoose object from your application
@param {Integer} port The port of the server instance
@param {Array} ssloptions Options like certificate etc for the SSL express server instance
@param {Array} routes Array of objects for routing information { url: '/import/incidents', prefix: 'import', type: 'incidents'}
@param {Array} listen IP addresses to listen on
@param {Function} defaultcallback Default function for callback
@param {Function} authcallback Callback function to implement custom authentication functions
Constructor for the module class