Skip to content
Snippets Groups Projects
Commit 511a4487 authored by Raphael's avatar Raphael
Browse files

Make running the websocket server a little easier

parent 99ad001d
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
mkdir -p -v log/thin/
bundle exec ruby ./script/websocket_server.rb&
bundle exec thin start $@
......@@ -19,6 +19,7 @@ def process_message
end
begin
EM.run {
Diaspora::WebSocket.initialize_channels
......@@ -35,7 +36,13 @@ end
ws.onclose { Diaspora::WebSocket.unsubscribe(ws.request['Path'].gsub('/',''), sid) }
}
end
puts "Websocket server started."
process_message
}
rescue RuntimeError => e
raise e unless e.message.include?("no acceptor")
puts "Are you sure the websocket server isn't already running?"
puts "Just start thin with bundle exec thin start."
Process.exit
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment