Skip to content
Host4u Limited

Node.js and Git in cPanel

Support Portal  »  Knowledgebase  »  Viewing Article
There was a problem loading the comments.
  Print

Both are included with every cPanel hosting account.

Git Version Control

Use Git Version Control (in the Files section) to keep your website's code in a Git repository on your account, and to deploy it.

  1. Open Git Version Control and click Create.
  2. To copy a repository from somewhere else, turn on Clone a Repository and enter the Clone URL. To start a new one, leave it off.
  3. Enter the Repository Path and the Repository Name and click Create.

The repository then appears in the list. Click Manage next to it to see its details and the Pull or Deploy section:

  • Update from Remote pulls the latest changes from the remote repository.
  • Deploy HEAD Commit copies your latest commit to where your website runs. Deployment needs a .cpanel.yml file in the repository that says what to copy, and at least one branch.
  • cPanel cannot deploy a repository that has uncommitted changes.

History shows the commits. Remove stops cPanel managing the repository but does not delete the folder.

Setup Node.js App

Use Setup Node.js App (in the Software section) to run a Node.js application on your account.

  1. Open Setup Node.js App and click Create Application.
  2. Choose the Node.js version, the Application mode (production or development), the Application root (the folder with your code), the Application URL (the address it is served on) and the Application startup file.
  3. Click Create.

Once it is created you can add environment variables, run NPM Install to install your dependencies, and Restart or Stop the application.

Related

File Manager and FTP and SFTP for getting your files onto the account, and Resource usage and limits if your application hits a limit.


Share via
Did you find this article useful?  

Related Articles


Self-Hosted Help Desk Software by SupportPal