I am new to node.js and Raspberry pi, I just followed the tutorial in http://joshondesign.com/2013/10/23/noderpi
now npm -version and node -v shows well.
then I put the server.js file in home/pi/app directory
every time I run sudo node /home/pi/app/server.js or move to the app directory run sudo node server.js
It comes out an error, which is:
sudo : node: command not found?
How to fix that? And is there any method to set the server start automatically every time I boot the Pi?