How to push data to client using node

I'm using node to make an email client. I want to update the browser window as soon as any new email arrives. I'm already fetching the emails on server side using mail-listener2. I want to push that data to client side. How do i do that?

Look at using websockets to push data in realtime to the client (browser). I would recommend using http://socket.io. They have some really great demos on there to show how you would do something like this.

Your server would send socket.io messages called message, containing the message details as JSON. Your client would listen for message events and update the UI as they come in.