I want to make a web page for give the client the news of his friends every 1 second using socket.io + node.js.
My codes :
Client :
<
That's pretty much the standard way to do it. If you've not already looked the example apps page on socket.io, there's a beibertweet example that does just this using setInterval.
Also there's a slightly more advanced example on this blog.
Plus .. I found Ryan Dahls's intro on YouTube really useful for understanding the basics of node operation.
Hope that helps.