Can I make a whole site in node.js?

I want to make a new website. Is it good programming approach if I am make whole site in node.js on server side?

I also know PHP if that is better.

Yes, you can build your whole site with node.js. The benefit of doing this is that you are using the same language for both the server-size page generation and client-side interactions.

For example, here's a simple one to find photos from flickr near a user: https://github.com/ericf/photosnear.me

The above uses YUI for the client side interaction.

Since you mentioned that you know PHP, it is entirely up to you as to whether you want to build the application with node.js. Do you want to learn how to use node.js? Then build it with node.js. Does the project schedule have a tight deadline and you won't have time to learn node.js? Then use PHP.

These might be a good one to get started

I also recommend Javascript: A Definitive Guide. The 6th edition contains an entire section on server-side javascript and node.js.

Node is still a young platform. While you can indeed make a whole site or web app using Node, it takes some experience with learning the platform, and is not particularly friendly to beginners. I'd stick with PHP to put sites together quickly, and experiment with Node until you learn it well enough to know when you should use it.