OPEN<\/strong> to view a test page for the application.<\/p>\n\n\n\n The message “It Works!” should appear.<\/p>\n\n\n\n
You can now customize the environment using the package.json settings file and the npm package manager. Following the next two procedures you can achieve this.<\/p>\n\n\n\n
Create package.json file<\/h3>\n\n\n\n Create package.json file by following steps below:<\/p>\n\n\n\n <\/figure>\n\n\n\nTo access the File Manager, click the File Manager<\/strong> icon under the FILES area of cPanel.<\/li>Select root folder of application under \/home\/<username>\/<\/code> in File Manager’s left-hand column.<\/li>To create a new file, click +File<\/strong> from Menu bar.<\/li>Enter package.json as New File Name in the New File<\/strong> dialog box and then click Create New File<\/strong>.<\/li>Use a right-click or secondary-click on the package.json file in the right-hand column of File Manager and select Edit<\/strong>. An edit dialog box appears.<\/li>Click Edit<\/strong> to close the Edit dialog box and open file editor screen.<\/li>Enter the following text into the editor screen.<\/li> Save the file by clicking Save Changes<\/strong>.<\/li>To close the editor, click Close<\/strong>.<\/li><\/ol>\n\n\n\nRun NPM Install<\/h3>\n\n\n\n Take the following actions to install npm:<\/p>\n\n\n\n
Select Setup Nodejs App<\/strong> in the SOFTWARE<\/strong> section of the cPanel homepage.<\/li>Click the pencil icon in the Web Applications<\/strong> list’s Actions<\/strong> column to edit the application.<\/li>To begin the NPM installation, click Run NPM Install<\/strong>.<\/li>Displays a success message, once the NPM installation completes.<\/li><\/ol>\n\n\n\n<\/p>\n\n\n\n
Manage Nodejs Applications<\/h2>\n\n\n\n To manage Nodejs applications created use following procedures:<\/p>\n\n\n\n
The Web Applications<\/strong> page shows the list of Nodejs applications.<\/p>\n\n\n\n <\/figure>\n\n\n\nStart Node.js Application<\/h3>\n\n\n\n By following the steps listed below, you can start nodejs application that had stopped:<\/strong><\/p>\n\n\n\nClick the Start icon in the row of the stopped application and in the Actions<\/strong> column.<\/li>Start icon changes to Stop icon, on completion of action.<\/span><\/li><\/ol>\n\n\n\nStop Nodejs Application<\/h3>\n\n\n\n By following the steps listed below, you can<\/strong> stop nodejs application that has already started:<\/strong><\/p>\n\n\n\nClick the Stop icon in the row of an already-running application in the Actions<\/strong> column.<\/li>Stop icon changes to Start icon, on completion of action.<\/li><\/ol>\n\n\n\nRe-Start Node.js Application<\/h3>\n\n\n\n By following the steps listed below, you can<\/strong> re-start nodejs application that has already started:<\/strong><\/strong><\/p>\n\n\n\nClick the Restart icon in the row of an already-running application in the Actions<\/strong> column.<\/li>An already-running application gets stopped and started again, on completion of action.<\/li><\/ol>\n\n\n\nDelete Node.js Application<\/h3>\n\n\n\n By following the steps listed below, you can<\/strong> delete nodejs application:<\/strong><\/strong><\/p>\n\n\n\nClick the Bin icon in the row of an application that to be deleted in the Actions<\/strong> column.<\/li>In the confirmation pop-up appeared, click AGREE<\/strong> to proceed with deletion or CANCEL<\/strong> to close it.<\/li>An application will be deleted from the Web Applications<\/strong> list once the action is completed.<\/li><\/ol>\n\n\n\nEdit Nodejs Application<\/h3>\n\n\n\n\n
By following the steps listed below, you can<\/strong> edit nodejs application:<\/strong><\/strong><\/p>\n\n\n\nClick the Pencil icon in the row of an application you want to edit, in the Actions<\/strong> column.<\/li>Application details will be opened in new tab for editing.<\/li><\/ol>\n\n\n\n <\/figure>\n\n\n\nYou can modify below details of that applications:Nodejs version :<\/strong> To change the Nodejs version, pick one from a drop-down list.<\/li>Application mode :<\/strong> To change the application mode, choose either Production or Development available in drop-down options.<\/li>Application root :<\/strong> A physical address for the application on a server that corresponds to its URI must be mentioned in order to specify the application root.<\/li>Application URL :<\/strong> Provide an HTTP\/HTTPS URL link to the application.<\/li>Application startup file :<\/strong> Enter the name of the application startup file as <filename>.js.<\/li>Passenger log file :<\/strong> Specify the path to the log file.<\/li>Environment variables :<\/strong> You can add or modify environment variable by specifying name and value to it. Also you can delete environment variable by clicking Bin icon in that row in Actions column. The confirmation pop-up appeared, click AGREE<\/strong> to proceed with deletion or CANCEL<\/strong> to close it.<\/li><\/ul><\/li>Following actions are available :RESTART :<\/strong> Click the RESTART<\/strong> button to restart the Nodejs app.<\/li>STOP APP :<\/strong> Click the STOP APP<\/strong> button to stop the Nodejs app.<\/li>Run NPM Install :<\/strong> To install the package(s) specified in the package.json file, click the Run NPM Install<\/strong> button.<\/li>Run JS Script :<\/strong> When you click the Run JS Script<\/strong> button, the command(s) specified in the Scripts<\/strong> section of the package.json file will be executed. Click “Ok” after selecting the script’s name and specifying any other necessary parameters.<\/li>Edit package.json :<\/strong> Click on edit<\/strong> to edit contents of package.json. The contents of package.json will be opened in editor in pop-up window. You can edit contents and then click the SAVE<\/strong> button to save it or CANCEL<\/strong> to cancel & close editor.<\/li><\/ul><\/li><\/ol>\n<\/div>\n\n\n\n<\/p>\n\n\n\n
Conclusion:<\/h2>\n\n\n\n This article summing up covering step-by-step procedure to deploy and manage Nodejs applications on server using cPanel with NodeJS Hosting. This article is written considering simple Nodejs applications particularly. For Nodejs applications with MySQL database refer another article here.<\/p>\n\n\n\n
<\/p>\n\n\n\n
<\/p>\n\n\n\n
<\/p>\n","protected":false},"excerpt":{"rendered":"
NodeJS hosting with cPanel made it simple and easy to deploy nodejs applications using Setup Nodejs App tool. Basically this […]<\/p>\n","protected":false},"author":170,"featured_media":1058,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74,88],"tags":[91,92,89,95,93,94],"yoast_head":"\n
NodeJS Hosting with cPanel to Deploy and Manage nodejs Applications - cPanel<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n