Here's an example of a chatroom using node.js, source code here.
I believe the client uses polling, but this example is interesting because the server side is in JS too, and node.js is efficient for this type of stuff.