made websocket server host configurable

This commit is contained in:
MrZYX 2010-09-18 17:27:13 +08:00 committed by Daniel Grippi
parent cc4e9f8d39
commit 5740c72804
2 changed files with 4 additions and 1 deletions

View file

@ -7,6 +7,7 @@
development:
debug: false
socket_debug : false
socket_host: 0.0.0.0
socket_port: 8080
socket_collection_name: 'websocket'
pubsub_server: 'https://pubsubhubbub.appspot.com/'
@ -14,11 +15,13 @@ development:
test:
debug: false
socket_debug : false
socket_host: 0.0.0.0
socket_port: 8081
pubsub_server: 'https://pubsubhubbub.appspot.com/'
production:
debug: false
socket_debug : false
socket_host: 0.0.0.0
socket_port: 8080
pubsub_server: 'https://pubsubhubbub.appspot.com/'

View file

@ -24,7 +24,7 @@ begin
Diaspora::WebSocket.initialize_channels
EventMachine::WebSocket.start(
:host => "0.0.0.0",
:host => APP_CONFIG[:socket_host],
:port => APP_CONFIG[:socket_port],
:debug =>APP_CONFIG[:socket_debug]) do |ws|
ws.onopen {