Articles on: Web Hosting

How to host a NodeJS application on Web Hosting

You may want to host a NodeJS application on your web hosting package for whatever reason. For example, An Express server. In this article, we will teach you how to host a NodeJS application on our web hosting packages!

Setting up the NodeJS Application on cPanel



Under the "Software" tab, Select the "Setup Node.js App" button.



Click the "Create Application" button.



You will need to fill in the following details:
Node.JS Version - The version of node.js you want your environment to run on
Application mode - Whether your application is in the Development stage or Production
Application root - A physical address on the server that corresponds with its URI. This will also be the place where you will upload the contents of your Node.JS application
Application URL - The HTTP/HTTPS Link it will run on
Application startup file - For example, index.js.
Passenger log file = Where the log file will be saved at.
Environment variables

Once you have entered in all of the details, click the "Create" button.



It should automatically generate some files and a default application will appear on the URL you specified in the form. If you visit the link you provided, a page should appear similar to this screenshot:



You are now able to upload all of your files using the File Manager or by using SFTP. We would recommend you to use SFTP. If you do not know how to use SFTP, we have an article explaining it here.


If you require any further assistance, please create a ticket here.


Created By: Greg K

Updated on: 28/05/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!