Node.js applications webhosting

Started by inaevrodom, Aug 28, 2022, 01:54 AM

Previous topic - Next topic

inaevrodomTopic starter

Could you provide information about hosting applications developed in Node.js and how it differs from hosting PHP applications?
When I want to host a web application written in PHP, I usually register an account with a hosting provider, create a directory, upload the files using FTP or PU, create a database, and then everything works smoothly.
However, when I looked into hosting providers for Node.js, I realized that the process is more complicated. I had to download and install multiple applications such as Node.js, Git, and the hosting service itself. I also had to deploy using command lines and deal with the database without any control panels or FTP.
I am wondering if this is just the nature of Node.js or if there are hosting providers that allow for a more user-friendly experience similar to hosting PHP applications. Additionally, I am curious about which hosting providers offer free trials of over 2 weeks for me to test out different Node.js engines.
  •  

debbiec12323

In theory, it is possible to use bash for web scripting, but in reality, nobody does. Similarly, applications developed using languages such as Node.js, Python, and Ruby listen on a port or socket, which is not possible with bash. PHP, on the other hand, supports this feature since it was added in PHP7. As a result, hosting for PHP-based websites has been around for longer and is more common.

However, as Python and Node.js gain popularity, people are starting to look for hosting providers that support them. Nevertheless, the architecture for applications developed in these languages remains the same. For this reason, it is unlikely that someone would want to separately manage multiple Python or Node.js scripting services for different users.
  •  

maxi007

There is a difference between how Apache and PHP work compared to Node.js. With Apache/Megawebserver and PHP, Apache listens on the port, parses the URL, and sends it to the root directory for processing. The PHP scripts then process the data and return the response back to Apache, which gives the answer to the client.
However, with Node.js, you listen to the port yourself and do not need Apache. When working with hosting, Apache is already configured and no one will open separate ports for each client because it can cause a load on the operating system. It is not possible to work with Node.js in the same way as with PHP, and an application developed in Node.js is not the same as a PHP application written in JavaScript. You must write in PHP as you would in PHP. If not, you must take into account the peculiarities of Node.js when deploying the application. Additionally, there may be pain points from the lack of RDP.
  •  

Andrei2022

The node is deployed in the same way as you run it on your machine. Rent a virtual machine (VPS \ VDS) and deploy everything there. You can even take a virtual machine on Windows. There is generally an RDP connection with the same desktop as on your machine. With support for copying by Ctrl+C, Ctrl+V.
  •  

dewalds86

Node.js is a well-established tool with a dynamic community and professional team dedicated to security and long-term support. It has garnered an audience of over 197,000 members on Reddit and has over 87,100 stars and 23,400 forks on GitHub.
The Go community, supported by Google, continues to grow annually. The GopherCon conference brings developers from all over the world together, leading to an increase in interest and participation. It has an audience of over 159,000 participants on reddit.com and has over 95,400 stars and 16,300 forks on GitHub.
Although Go surpasses Node.js in most scenarios, including performance, concurrency, scalability, and simplicity, Node.js libraries are highly regarded. Many companies have switched to Go for improved software performance. However, the choice of technology is often dependent on your team's familiarity with it and the overall performance you can achieve with it.
If you have expertise in JavaScript development and require Node.js libraries that may not be available in Go, and if the functionality of Go is not critical for your application, Node.js may be a good option. Otherwise, it is better to choose Go based on your needs.
  •  

matt90

Hosting Node.js applications can indeed be a bit more involved compared to hosting PHP applications, but there are hosting providers that offer user-friendly experiences similar to hosting PHP applications. To better understand the differences, let's break down the process for hosting applications in Node.js.

Node.js is a runtime environment for executing JavaScript code on the server-side. Unlike PHP, which typically relies on shared hosting environments with pre-installed PHP interpreters, Node.js applications require more control over the server environment.

When hosting a Node.js application, you generally have two main options:

1. Self-hosting: In this approach, you would provision a server (either a physical server or a virtual machine) and configure it yourself. You would need to install Node.js, manage dependencies manually, set up your database, and handle deployment using command-line tools or scripts. This approach provides the most flexibility but requires more technical expertise.

2. Managed hosting: Many hosting providers offer managed Node.js hosting solutions that abstract away the underlying infrastructure and provide user-friendly interfaces for managing your application. These providers often handle server setup, scaling, security, and other administrative tasks, allowing you to focus on developing your application. Some popular managed Node.js hosting platforms include Heroku, AWS Elastic Beanstalk, Google Cloud Platform's App Engine, and Microsoft Azure's App Service.

Regarding availability of free trials, different hosting providers have varying offerings. Heroku, for example, offers a free tier that allows you to host basic applications, though with some limitations on resources. AWS Elastic Beanstalk also offers a free tier for new customers. Google Cloud Platform and Microsoft Azure usually have trial periods with free credit that you can use to test their services, including hosting Node.js applications.

It's worth noting that while self-hosting can be more hands-on and require more initial setup, it provides greater control and flexibility. Managed hosting, on the other hand, abstracts away much of the infrastructure setup and management, making it easier to deploy Node.js applications without dealing with low-level details.

Ultimately, the choice between self-hosting and managed hosting depends on your specific needs, technical expertise, and preference for control versus ease of use.
  •