Node.js hosting requirements and tips for choosing a service provider image

Node.js hosting requirements and tips for choosing a service provider

Node.js Hosting Requirements

You have no idea what Node.js hosting needs to be covered for your application?

Looking for the best Node.js hosting platform?

In this article, we will take an in-depth look at all the aspects and subtleties that you need to analyse to choose the best option.

We will also provide a step-by-step tutorial on how to get Node.js applications hosted in the cloud on the Ghost publishing platform example.

Why developers and businesses prefer Node.js

Because of its simplicity, Node.js is becoming increasingly popular among developers around the world.

The JavaScript code is fairly easy to understand, even for non-professionals, and the open-source platform facilitates the application development process.

In addition, the Node package manager includes tons of pre-built modules, which further accelerate development speed. Scalability, reduced response time and the ability to use the same language on the server and client side are also proven advantages of Node.js.

Today, most companies and industries choose Node.js to develop their projects. Such a runtime environment is perfect for modern applications because it scales very well without additional investments in hardware.

REST APIs, real-time applications, single pages and more can be easily built and run on almost any known platform.

Choosing the best Node.js hosting provider

In general, once your Node.js application is ready to go live, you start looking for reliable and secure hosting for it.

In this guide, we will review the main aspects you need to evaluate before choosing the right hosting platform.

Not all providers offer support for an event-driven JavaScript runtime environment and development framework. So you need to do some thorough research to find the best Node.js hosting for your application.

Why choose Hidora Cloud hosting?

In this section you will find some more details on how you can benefit from a reliable Node.js cloud hosting platform in terms of application development and management automation.

The Hidora multi-cloud platform is fully compliant with the Node.js hosting requirements mentioned above and offers a wide range of features, including :

Node.js Deployment Example: Ghost Publishing Platform Configuration on Hidora Cloud

Let’s check out how easy deploying a Node.js application can be with the Hidora cloud platform by taking the example of the popular publishing platform - Ghost.

  1. Log into your Hidora dashboard and click the New Environment button.

  2. Select the Node.js tab in the dialog box that appears, add the MySQL database and specify the resource limits for the environment. After that, name your environment and click Create.

    tutorial node.js Hidora
  3. Download the required version of Ghost from its GitHub.

    GitHub platform
  4. Return to the Hidora dashboard and download the archive via the deployment manager.

    hidora platform
  5. Deploy the package in the environment you created earlier.

    Deploy app hidora cloud hosting
  6. Configure the MySQL database via phpMyAdmin (use the credentials you obtained when creating the MySQL node by email to log in).

    Configure MySQL database via phpMyAdmin
  7. Create the new database in the phpMyAdmin dashboard.

    myphpadmin
  8. Configure your Node.js server via the configuration file manager :

Configure your Node.js server via Configuration File Manager
  1. In the file defaults.json, change the url and server sections to the link to your environment and the IP address of your Node.js server. Replace port 2368 with 8080.
    {
    "url": "",
    "server": {
    "host": "",
    "port": 8080
    }
    }
change url and server

In the file config.development.json, replace the following:

"url": "http://localhost:2368",
"database": {
  "client": "sqlite3",
  "connection": {
    "filename": "content/data/ghost-dev.db"
  },
  "debug": false
}

// Replace with 

"url": "http://ghost.hidora.com",
"database": {
  "client": "mysql",
  "connection": {
    "host" : "10.102.10.105",
    "user" : "root",
    "password" : "RRLlxp22173",
    "database" : "ghost"
  }
}
  1. Where:
    “url”: “http:// ghost . hidora . com” - url of the environment
    “client”: “mysql” - type of database used
    “Host”: “10.102.10.105” - internal IP address of the database node platform
    “user”: “root” - the user name of the database from the e-mail
    “password”: “RRLlxp22173” - the database password from the e-mail
    “database”: “ghost” - the name of your database
configure environment json

In the file config.production.json, also replace the following parameters:

"database": {
    "client": "mysql",
    "connection": {
    "host": “127.0.0.1",
    "user": "root",
    "password" : "",
    "database" : "ghost"
    }
    }

// Replace with 

"database": {
"client": "mysql",
"connection": {
"host" : "10.102.10.105",
"user” : "root",
"password” : “RRLlxp22173",
"database” : "ghos"
}
}

9. Connect to your Node.js server via Web SSH and run the following commands one by one to configure the database migration tool for knex (a query builder for MySQL):

cd ROOT
sudo npm install -g knex-migrator
knex-migrator init

10. Restart the Node.js server to apply the changes you have made.

It’s done! Your Ghost application has been successfully hosted on the Hidora platform. Just click Open in the browser and you can start.

We hope this tutorial will help you find the best Node.js hosting solution for your application. If your application requires other specific hosting options and features, please contact our support team We are always happy to help you.

Create an account for free
profile picture

Written By

Matthieu ROBIN

06/04/2020

Matthieu Robin is the CEO of Hidora, an experienced strategic leader, a former system administrator who has managed and configured more environments manually than anyone else on the planet and after realising that it could be done with a few clicks created Hidora SA. Follow him on Twitter.

Start your free trial

No credit card required. Free 14 day trial.

We only use your personal data to create your account, promise!

Choose your currency

chf
eur

Read more articles

bg

Receive our news