Module: Slanger::Service

Extended by:
Service
Included in:
Service
Defined in:
lib/slanger/service.rb

Instance Method Summary collapse

Instance Method Details

#runObject



6
7
8
9
10
11
# File 'lib/slanger/service.rb', line 6

def run
  Slanger::Config[:require].each { |f| require f }
  Thin::Logging.silent = true
  Rack::Handler::Thin.run Slanger::Api::Server, Host: Slanger::Config.api_host, Port: Slanger::Config.api_port
  Slanger::WebSocketServer.run
end

#stopObject



13
14
15
# File 'lib/slanger/service.rb', line 13

def stop
  EM.stop if EM.reactor_running?
end