when i put socket.on('chat message') listener in app.run, it worked except i didn't know how to modify chat.html from there. When I instead put it in the specifc match ctrl, the event fired twice for some reason. So I implemented a super hacky work-around by using .once instead of .on, and calling it recursively in specific match ctrl. Works for now