VDS hosting with pre-installed Node.js

Started by PlotHost, Nov 20, 2022, 01:19 AM

Previous topic - Next topic

PlotHostTopic starter

As of now, I am focusing mainly on React but have started working with Node.js. Recently, I created a basic API for a project that required hosting.

I came across a video tutorial where an application with a MySQL connection was quickly deployed on a hosting platform with just 4-5 clicks on the web panel. However, the technical support mentioned that such services are no longer provided when responding to my ticket.

This brings me to the question - Is there any cost-effective hosting service available where I can conveniently deploy Node.js and MySQL or alternatively, deploy everything over SSH?
  •  

the_architect

Previously, I had deployed nodejs + mysql via ssh. However, recently they have made it possible to install nodes on any tariff without the need for VPS.

For those interested in using VPS with Node.js, check out this resource: https://freehost.com.ua/vps-hosting/pr/nodejs/. Additionally, NVM is already installed on the server and any required MySQL installations will be done for free.
  •  

britals1

Have you ever wondered how to prevent node_modules from being pushed into the repository? I tried creating a .gitignore file with the string "node_modules" for an express.js based project. However, this resulted in the app not working on the server due to the absence of the "express" package.

As a workaround, I added everything to the repository which made the app work fine on the server. But, this isn't the ideal solution.

Do any of you have suggestions on what steps can be taken to avoid pushing node_modules into the repository while ensuring the app runs smoothly on the server?
  •  

michaelhager

Yes, there are several cost-effective hosting services available that support Node.js and MySQL deployments. Some popular options include Heroku, DigitalOcean, AWS (Amazon Web Services), and Google Cloud Platform.

Heroku is known for its simplicity and provides a convenient platform for deploying Node.js applications with minimal configuration. It supports different database options, including MySQL.

DigitalOcean offers a range of affordable options for virtual private servers (VPS) where you can install and configure Node.js and MySQL manually. It provides an easy-to-use interface and allows deployment over SSH.

AWS and Google Cloud Platform both offer comprehensive cloud services with extensive options for hosting Node.js applications and MySQL databases. Although they may have more configuration steps compared to Heroku or DigitalOcean, they provide scalability and flexibility for larger projects.

Here are some more details about each hosting service mentioned:

1. Heroku: Heroku is a cloud platform that allows you to easily deploy and manage applications. It supports Node.js with a simple deployment process, and you can add a MySQL database to your application using Heroku add-ons like ClearDB or JawsDB.

2. DigitalOcean: DigitalOcean provides virtual private servers (VPS) known as "Droplets" that you can configure and manage yourself. You can set up a Droplet with a Node.js environment and install MySQL on it. DigitalOcean offers a user-friendly interface and robust documentation for getting started.

3. AWS (Amazon Web Services): AWS offers a wide range of cloud services, including Amazon Elastic Compute Cloud (EC2) for hosting Node.js applications and Amazon Relational Database Service (RDS) for managing MySQL databases. You can configure and deploy your Node.js application on EC2 instances and set up an RDS instance for your MySQL database.

4. Google Cloud Platform: Google Cloud Platform offers similar services to AWS, with Google Compute Engine for hosting Node.js applications and Google Cloud SQL for managing MySQL databases. You can create a Compute Engine instance, deploy your Node.js app, and set up a Cloud SQL instance for your MySQL database.

All of these services provide different levels of scalability, pricing options, and additional features. It's recommended to review their respective documentation, pricing plans, and user reviews to determine which one aligns best with your needs.
  •