Setting up a Node.js Application with cPanel using the Node.js Selector Print

  • cPanel
  • 0

To set up a Node.js application using the cPanel interface on TurnUpHosting, follow these steps:

  1. Log in to your cPanel account.
  2. Open the Node.js app tool.                                                                                                                                     cPanel - Software - Setup Node.js App
  3. On the Node.js selector page, click on "CREATE APPLICATION" to start the application setup.
  4. Fill in the required fields on the application setup form:
    • Node.js version: Select your preferred version from the drop-down list.
    • Application mode: Choose either Development or Production.
    • Application root: Specify the file system location for your application files.
    • Application URL: Enter the address of your application on the Internet.
    • Application startup file: Specify the initial file that will be processed when launching the application.
  5. Click on "CREATE" to create the application. The application will start automatically.
  6. To view a test page for the application, click on "OPEN". You should see the "It Works!" message appear.

To enhance the environment with the package.json settings file and the npm package manager, follow these additional steps:

  1. Create the package.json file by opening the File Manager in cPanel.
  2. Navigate to the application root folder and click on "+File" to create a new file.
  3. In the New File dialog box, enter "package.json" as the filename and click on "Create New File".
  4. Right-click or secondary click on the package.json file and click on "Edit".
  5. In the Edit dialog box, click on "OK" and enter the following text in the editor screen:
language-json
Copy code
{ "name": "app", "version": "1.0.0", "description": "My App", "main": "app.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC" }
  1. Click on "Save Changes" to save the file and then click on "Close" to close the editor.

To install npm, follow these steps:

  1. Open the Node.js app tool in cPanel.
  2. In the Actions column of the Web Applications list, click on the pencil icon to edit the application.
  3. Click on "Run NPM Install". The installation will run and display a success indicator when complete.

That's it! You have successfully set up a Node.js application using the cPanel interface on TurnUpHosting.


Was this answer helpful?

« Back