Skip to content

Commit

Permalink
Listening on 0.0.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jgelens committed Jan 11, 2014
1 parent b5b3f06 commit e4f5039
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/chat/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ def index():
return render_template('index.html')

WebSocketServer(
('', 8000),
('0.0.0.0', 8000),
Resource({
'/chat': ChatApplication,
'/.*': DebuggedApplication(flask_app)
'^/chat': ChatApplication,
'^/.*': DebuggedApplication(flask_app)
}),
debug=False
).serve_forever()
2 changes: 1 addition & 1 deletion examples/chat/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h3>Connected clients</h3>

<script>
var nickname = $('.nickname').val();
var ws = new WebSocket('ws://localhost:8000/chat');
var ws = new WebSocket('ws://' + window.location.hostname +':8000/chat');

ws.onopen = function () { $('.connecting_status').text('connected'); }

Expand Down

0 comments on commit e4f5039

Please sign in to comment.