most programs would be installed in the opt folder. But you will have to have root privileges to copy them there.
I often just use my /home folder/partition and place them there. But it's up to you.
Nodejs how ever is in the Ubuntu repositories and should be installed via apt or package manager. I can't remember but nodejs maybe part of java.