So I've managed to install Node and NPM on my shared hosting account with Namecheap by following this answer. However, I'm not sure how I'm supposed to start the module in question. Node is installed at the "home" folder, e.g outside the public_html where I store the .js module & the rest of the website.
When I want to launch it from my own computer I simply go into cmd(npm) and type in "node index.js", and it starts. Now I'm using Putty(ssh/telnet client). I log in to the host name with my cPanel username & password, but then I'm not really sure what to do. When I type npm I'm greeted with commands I'm able to use, so it's installed alright, but when I try to do the same "node index.js" as on my own PC it just says that it cannot find the module. The index.js file is in the public_html folder so I'm pretty sure I have to have that in mind, but I've tried several things like going into that directory by using the "cd" command.
I started using node like 2 days ago so pls be gentle on me..Probably something stupidly easy I'm missing. Thanks in advance
via Chrillex
No comments:
Post a Comment