Can node.js run in any hosting provider?

后端 未结 2 666
无人及你
无人及你 2020-12-15 21:35

Sorry for this newbie question. Can node.js run in any hosting provider like Fastdomain? We have an account in fastdomain where we upload our Website made in PHP. I allowed

相关标签:
2条回答
  • 2020-12-15 21:47

    No, Node can't run on any hosting providers, you can however deploy Nodejs projects in PAAS sites as Heroku and Linode that offer a plataform for you to deploy your app or on Cloud Hosting Providers.

    The PAAS model puts the provider as responsible for infrastructure and for configuring the OS and the overall infrastructure, and you only have to worry with develop and deploy.

    On other hand Nodejs can be deployed on any Cloud Hosting, once you have acess to a virtual or dedicated server you can install nodejs and the dependencies to start offering your application, in this case you are responsible for Install Nodejs, Databases, Webservers (if you don't wanna use Node's Http server).

    Cloud Hosting are usually more expensive but offer more control over infrastructure, PAAS are often more easy to use from a developer point of view once that is only develop and deploy (sometimes configure like domains and other account settings).

    0 讨论(0)
  • 2020-12-15 21:57

    No, you can not run Node.js on every hosting provider. You need certain base capabilities. If your hosting provider doesn't directly support Node.js (like Heroku does), then you need to be able to shell into your server. You also need access to a C compiler to build Node.js or the ability to install packages for your system.

    Once you get Node.js installed then you need root access to be able to run it on port 80. You can get around this if your provider provides reverse proxy service.

    The fact that you can shell in is a good start. It might be possible on Fastdomain, but to be sure you should contact Fastdomain support. Every hosting provider is different and if you have shared hosting then the answer is most likely no. You generally need dedicated hosting to run Node.js.

    0 讨论(0)
提交回复
热议问题