diff --git a/config/app_config.yml b/config/app_config.yml index a138424ee..354dc75b2 100644 --- a/config/app_config.yml +++ b/config/app_config.yml @@ -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/' diff --git a/script/websocket_server.rb b/script/websocket_server.rb index 2fbc1370a..dae054f15 100644 --- a/script/websocket_server.rb +++ b/script/websocket_server.rb @@ -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 {