Module: Blade::Server
Constant Summary collapse
- WEBSOCKET_PATH =
"/blade/websocket"
Instance Method Summary collapse
Methods included from Component
Instance Method Details
#client ⇒ Object
20 21 22 |
# File 'lib/blade/server.rb', line 20 def client @client ||= Faye::Client.new(websocket_url) end |
#start ⇒ Object
10 11 12 13 14 |
# File 'lib/blade/server.rb', line 10 def start Faye::WebSocket.load_adapter("thin") Thin::Logging.silent = true Thin::Server.start("localhost", Blade.config.port, app, signals: false) end |
#websocket_url(path = "") ⇒ Object
16 17 18 |
# File 'lib/blade/server.rb', line 16 def websocket_url(path = "") Blade.url(WEBSOCKET_PATH + path) end |