Sha256: 3f738b7600b584bf89dc52e667f7e511e5dc680b60bd2695b917ee4b2dc72bf9

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

module MobME::Infrastructure::RPC
  class Runner
    def self.start(application, host, port, route)
      begin
        require "thin"
      rescue LoadError
        puts "Thin must be installed to use the server, please add thin to your Gemfile"
        exit
      end

      Thin::Server.start(host, port) do
        # Since no logger is specified, this will log apache-style strings to STDERR for each request.
        use Rack::CommonLogger

        map route do
          run Adaptor.new(application)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sync_service-0.1.0 lib/mobme/infrastructure/rpc/runner.rb
sync_service-0.0.8 lib/mobme/infrastructure/rpc/runner.rb