Module: QuestionCompiler::Server

Defined in:
lib/question_compiler/server.rb

Defined Under Namespace

Classes: QuestionHandler

Class Method Summary collapse

Class Method Details

.start(port) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/question_compiler/server.rb', line 3

def self.start(port)
  require 'rack'
  app = QuestionHandler.new Dir.getwd
  begin
    Rack::Handler::WEBrick.run app, Port: port
  ensure
    app.cleanup
  end
end