0

I looked through some hosting websites (https://www.fastcomet.com and https://www.hostinger.com) that claimed they support nodeJS. When they list features, however, nodeJS never appears. Instead, they list things like number of subdomains, FTP support, bandwidth, storage, etc.

What bothers me is that they also list PHP. To me, nodeJS and PHP are similar since they are both programming languages that you need to download. If they list PHP but not nodeJS, does that mean they do not support nodeJS? Or can I download nodeJS after I get the server? I never dealt with hosting before.

0

If I was you, I'd take a look at hosting on a service like DigitalOcean or similar where you have control over your server environment. You'd need to use node to execute your code and return data to the client.

I'd recommend using something like DigitalOcean's official NodeJS image - https://marketplace.digitalocean.com/apps/nodejs

Depending on whether you are looking to host a single site or multiple node applications you might also want to add a load balancer. However, the above image will get you started nice and quickly.

-3

When you develop in NodeJS on your local computer you need node to be installed to compile the code. After development done you generate static files and you don't need node to be installed on the server for a client node app. PHP is an interpreted language and needs an interpreter to run so you have to have the interpreter on both local and server machines.

Basically after the development done you just upload dist folder via FTP or similar to the server's web directory

  • This isn't the case for node at all. The content needs to be physically executed and served via node. Unfortunately, it's not as simple as just uploading and letting the client execute, node is executed on the server side. – Chris Sep 23 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.