lib/_thriftServer.js
function Server(service, methods) {
  this.service = service;
  this.methods = methods;

  if (typeof service === 'undefined') {
    throw new Error('Thrift Service is required');
  }

  if (typeof methods !== 'object' || Object.keys(methods).length === 0) {
    throw new Error('Thrift Methods Handlers are required');
  }

  return thrift.createServer(this.service, this.methods,
    {transport: thrift.TBufferedTransport, protocol: thrift.TBinaryProtocol});
}
function Server(service, methods) {
  this.service = service;
  this.methods = methods;

  if (typeof service === 'undefined') {
    throw new Error('Thrift Service is required');
  }

  if (typeof methods !== 'object' || Object.keys(methods).length === 0) {
    throw new Error('Thrift Methods Handlers are required');
  }

  return thrift.createServer(this.service, this.methods,
    {transport: thrift.TBufferedTransport, protocol: thrift.TBinaryProtocol});
}
function Server ( service , methods ) { this . service = service ; this . methods = methods ; if ( typeof service === 'undefined' ) { throw new Error ( 'Thrift Service is required' ) ; } if ( typeof methods !== 'object' || Object . keys ( methods ) . length === 0 ) { throw new Error ( 'Thrift Methods Handlers are required' ) ; } return thrift . createServer ( this . service , this . methods , { transport : thrift . TBufferedTransport , protocol : thrift . TBinaryProtocol } ) ; }
Create a New thrift Server

@param {object} service the thrift service
@param {object} methods the function handlers for the thrift calls

@fires thrift/Server#listening
@fires thrift/Server#connection
@fires thrift/Server#close
@fires thrift/Server#error

@class thrift/Server
Create a New thrift Server