- 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 available 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 accessed from.
- Application Startup File: This is where you input the name you want for your application’s 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.