cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Deploy node.js app

I have a Linux Ultimate Hosting account and I am trying to work out how to deploy a nodejs app to one of my sub domains. Are there any godaddy instructions on how to do this?

 

I followed the instructions here and seem to have node installed: https://ferugi.com/blog/nodejs-on-godaddy-shared-cpanel/

 

I also followed another tutorial which showed how to use the .htaccess file to divert the domain to use the app e.g.

 

PassengerBaseURI /
PassengerAppRoot /home/{user}/myapp

PassengerAppType node
PassengerStartupFile start.js

 

It doesn't work and I don't have a lot of confidence that this is correct.

 

Does anyone have any good instructions?

 

Thanks in advance!

3 REPLIES 3
Solution

Re: Deploy node.js app

I did a bit more digging and found the solution here: 

 

https://stackoverflow.com/questions/40146067/i-have-godaddy-web-hosting-i-need-to-host-node-js-websi...

 

I needed to add the following to the .htaccess file.

 

RewriteEngine on
RewriteRule (.*) http://localhost:3000/$1 [P,L]

 

Hopefully this will help someone else!

Re: Deploy node.js app

It will be great if you share your steps, I have node installed using nvm.

New

Re: Deploy node.js app

I tried the steps but after creating the .htaccess I get :

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.