Method: Souffle::Server#run_server

Defined in:
lib/souffle/server.rb

#run_serverObject

Starts a long-running webserver that continuously handles requests.



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/souffle/server.rb', line 43

def run_server
  EM.synchrony do
    @app = Rack::Builder.new do
      use Rack::Lint
      use Rack::ShowExceptions
      run Rack::Cascade.new([Souffle::Http])
    end.to_app

    Rack::Handler.get(:thin).run(@app, rack_options)
  end
end