Gonna get back on the computer today. Have installed node.js on the server. Now just gotta figure out how to use the terminal within namecheap. Do I have to use that and install the libraries before any code ai write is able to call them? Or is it possible to load them via commands within the code itself? #asknostr
Discussion
For using terminal commands, you need a server (vps or dedicated), not just a standard hosting.
There's a button on cpanel to instal node.js, I've been through the rigmarol of setting it up, but something confused me, it said I had to use SSH to upload files and had to create a key pair to enable that and the terminal, which only appeared in cpanel when that was done - I don't get why I can't just ftp the files to the locations like I normally would
By libraries do you mean node modules or system libraries? You can install individual node modules using npm from the working directory of your project. Npm init will create a package.json file and you can use the --save option to write the dependency to your package file when installing new modules. You can't pull dependencies from within a REPL if that's what you were asking
I'm going to have another go when I get back to the computer later...like all things, till you've done it once it can be a bit daunting but I'll get it eventually
I've never used name cheap for hosting before but as long as you have a shell you can probably get node running and start hacking at your project. You can probably also do the development locally (I find this to be faster) without having to pay for hosting until you have a working program.
I already had the domain and hosting so I figured I'd build in situ, that way I can check how things appear on various screen types as I go too which I realised I needed to do when building static websites in the past, but just in case I decide to build locally, how much of a ball ache is it to transfer what you've done on your own machine to your hosting provider? Is it a quick simple process, or something else to learn and get my head around? 😆
If you keep your code in git it's pretty easy to clone it anywhere. Also generally advisable as a way to track your project history and avoid breaking things or ending up with different versions floating around.
I have to get passed my nerves and use git, I'm just a bit coy given I've not done any coding in 26 years till I started on Python last year