0

I have purchased Gen4 VPS Linux 4 CPU server on godaddy with cpanel. Then i created WHM account for cpanel. Then hosted angular website to cropydeals.com doamin using file manager. CPanel IP assigned to godaddy record to run website.

https://www.cropydeals.com/index

Then i have created sub-domain with name api.cropydeals.com. in file manager folder get's created with api where uploaded nodejs project. And also created godaddy record to work api.cropydeals.com url.

https://api.cropydeals.com/

Then with the help of SSH (Putty) i login as root & installed nodejs.

enter image description here

but still my nodejs server is not running.. Instread of running node server.js file it is showing content in that file.

enter image description here

It should run like below image

Note : Below is image is just for reference

enter image description here

1 Answer 1

0

What port is your node instance running on? Typically you would use a reverse proxy via nginx to router traffic from 443 / 80 --> node Port

Otherwise, running the node server directly will need to have the port associated with it to be accessible.

Sign up to request clarification or add additional context in comments.

1 Comment

I have added 8081 port in server.js file. At local when we run "npm start" command my server get's run. But on cpanel it is showing code within file..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.