After boot means before login. That would launch your script as a daemon and would not (by default) output anywhere. The script's parent would be the init process rather than a particular terminal, like.
You want to launch the script as the child of the terminal after login, so you get output. So the best approach is to add it to /etc/profile (or ~/.bashrc (assuming you're using bash (you probably are))). /etc/profile will be run for any user that logs in whereas ~/.bashrc is specific to your user. Either is fine.
The code in your post above isn't quite right. You want to run your script with the node binary. The node binary is in your path (i.e. you can just call it by name like other system binaries). So you want to do:
Code:
node /path/to/your/file.js
(I don't know why your index.js has a .sh extension. It shouldn't. It won't hurt but it's not right)
(The dot in your example is used to tell the shell to execute something that's not in your path. Since we're running node itself and then executing your script with node, you don't need it here)
EDITED: 29 Jan 2016 11:41 by X3N0PH0N