Module: BladeRunner::Server
Constant Summary collapse
- WEBSOCKET_PATH =
"/blade_runner/websocket"
Instance Method Summary collapse
Methods included from Component
Instance Method Details
#client ⇒ Object
19 20 21 |
# File 'lib/blade_runner/server.rb', line 19 def client @client ||= Faye::Client.new(websocket_url) end |
#start ⇒ Object
10 11 12 13 |
# File 'lib/blade_runner/server.rb', line 10 def start Faye::WebSocket.load_adapter("thin") Rack::Server.start(app: app, Port: BR.config.port, server: "thin") end |
#websocket_url(path = "") ⇒ Object
15 16 17 |
# File 'lib/blade_runner/server.rb', line 15 def websocket_url(path = "") BR.url(WEBSOCKET_PATH + path) end |