I see people are complaing about the XHR requests. That's not my fault. I'm using heroku for hosting and it does not support websockets, so I have to force socket.io to use ajax long polling. That's actually heroku's solution.
But if you run it on your server or Cloud9 ide it will work just fine.
Well I didn't think there would be so many people on it :) But it was so much fun until it failed :) I will probably fix those issues but it was just a demo to see node.js and socket.io
I've written a (very) basic mud server in node.js (in like 8 hours). Maybe you'll be interested:
https://github.com/farevalod/nodemud
(I'd appreciate some comments on it too!)
Seems fairly usable atm. A few observations: there is an XSS vulnerability as you probably learned by now. Also, there was a moment when someone was submitting content and it appeared under my nick "bpfh".
Other than that, kudos for a simple well-functioning chat.
> > Also, there was a moment when someone was submitting content and it appeared under my nick "bpfh".
> Thanks. Those two security issues are fixed now.
You fixed one way of nickname duplication, but so long as you allow arbitrary utf-8 strings, there are all sorts of non-printing characters to use. You should really get a list of everything to filter. I don't have any experience with node.js, so I don't know if anyone has written a library that does it.
I didn't say it's brand new. Actually this is basically a hello world aplication for node.js
I liked the output and wanted to know what people would think about it.
BTW, I didn't copy anything, I watched the video and saw ryan doing TCP chat example and I thought I can do it for web and that would be great to learn node.js and socket.io
UI is great. I wrote one serveral days ago, aiming to offer real time chat featute(http:zhonglichat.cnodejs.net), new I see how ugly that is.. Nodejs moke chating really fun.
27 comments
[ 3.2 ms ] story [ 77.6 ms ] threadBut if you run it on your server or Cloud9 ide it will work just fine.
Also, with so many users chatting the screen scrolls too fast so I would reduce the vertical spacing a bit.
https://github.com/serkanyersen/Basic-Chat
Other than that, kudos for a simple well-functioning chat.
> Thanks. Those two security issues are fixed now.
You fixed one way of nickname duplication, but so long as you allow arbitrary utf-8 strings, there are all sorts of non-printing characters to use. You should really get a list of everything to filter. I don't have any experience with node.js, so I don't know if anyone has written a library that does it.
I liked the output and wanted to know what people would think about it.
BTW, I didn't copy anything, I watched the video and saw ryan doing TCP chat example and I thought I can do it for web and that would be great to learn node.js and socket.io