Setting up a NodeJS application in cPanel
IMPORTANT: This is an advanced guide, and is intended to help Node.js application developers get started
cPanel supports the ability to create a Ruby application, here are the steps:
- Log in to cPanel.
- Click on Setup Node.js App under Software.
- Click Create Application.
- Input the details for the application:
- Node.js Version: You can choose from any of the availabe versions in the drop down menu
- Application Mode: Development and Production modes are available
- Application Root: Here is where you determine the file/folder path to your application
- Application URL: This is where you decide what URL your application will be access from
- Application Startup File: This is where you input the name you want for your applications main startup file
- Passenger Log File: This will be the filename for the Apache Passenger Log file
- Click Create.
Managing your application via SSH
cPanel provides you with the virtual environment for your Node.js application, which you can access via SSH. Here are the steps:
- Log in to cPanel.
- Click on Setup Node.js App under Software.
- Click the Edit option next to your application (the pencil icon).
- Next to “Enter to the virtual environment. To enter to virtual environment, run the command” you will see the command that starts with the word source. Copy the command.
- Log in to your account via SSH.
- Run the command provided, this will load you into the Node.js application’s virtual environment.