NODE JS: My node application runs when I run from cPanel terminal, BUT when I run from application manager it does not get the path.
NODE JS application is not Running after registering from Application Manager.
1. create a directory nodejsapp in home (not in public_html)
2. Configure in Application Manager
3. Node runs but it shows "Cannot GET /nodeapps"
How to locate the nodejsapp in home directory?
app.js
const express =require('express');
const app = express(); // initialize express
const PORT = 3000;
app.get('/', function (req,res){
res.send(' Node Is WORKING...' + PORT)
});
-
My node application when run from cPanel terminal it works, but when run from application manager it does not get the path. const express =require('express'); const app = express(); const PORT = 5000; app.get('/', function (req,res){ res.send('Node Response is WORKING...') }); Result Shows: Cannot GET /nodeapps I tried both ways by putting the nodeapps forder in HOME directory and also under public_html 0 -
Hey there! I know we spoke a bit in Discord, but we weren't able to come to a resolution. Are you able to get an application working by following the instructions here? How to Install a Node.js Application | cPanel & WHM Documentation 0
Please sign in to leave a comment.
Comments
2 comments