Now, you can make setting up node.js on hosting more easily by using the NodeJS App Setup feature on cPanel Hosting. Please follow how to run nodejs on the following hosting. If you want to do it manually, that's fine too. Want to know how? Come on, follow the following guidelines.
Remember, the NodeJS feature is only available on Super Hosting Packages and above !
What is Node.js?
How to Run NodeJS on Hosting
The first thing you will do in this guide on how to run nodejs on hosting is to run the Node.js service first. But keep in mind, you must have access to a good Hosting / Server via SSH. In this tutorial, we will discuss how to run the Node.js service on hosting in 2 ways. The first is through the NodeJS App Setup menu in cPanel. The second is the manual way. We recommend using the first method, namely through the NodeJS App Setup if you want to install NodeJS-based applications such as Ghost, ExpressJS, ReactJS, PhantomJS and so on. Why? Because the first way is easier! You only need to select the NodeJS App Setup menu then enter the configuration only.
The Automatic Way (Through the NodeJS App Setup)
You can set NodeJS via the NodeJS App Setup menu on cPanel Hosting. The step is to log into cPanel then select the menu
Setup NodeJS Appin cPanel. To do this, write "
nodejs" in the search field. After appearing, please click
Setup NodeJS App. For more details, please read Easy JS Node Settings
1. Perform SSH access
akses server/ hosting yang anda miliki melalui SSH. If you don't know how, please read the SSH Access Guide . Write
ssh username@controlpanelURL p 64000
2. Checking Node.js
If you have logged on to the server, please check whether Node.js has been installed or not. The way is by typing "
node" in the terminal. If you don't have Node.js installed, please install it according to the official Node.js documentation at nodeguide.com . To run Node.js on a server, it's quite easy. Just simply write down the word
â€œnodeâ€ sebelum script.js.
3. Restart NodeJS
Then please restart NodeJS first with the following command,
So, look what happened. Your script has been executed successfully!
How Can NodeJS Service Get Continuous Uptime?
In order for NodeJS service to have continuous uptime, you can follow the Guidelines for NodeJS Service to Continue .
How to Run NodeJS Over Specific Ports?
So that the NodeJS application can be accessed through a certain port and so that it can be accessed at the http / tcp port: 80, you can follow the NodeJS Redirect Guide to Other Ports