Finally got node.js hosting up and running on Cloudways hosting... well sort of

Continuing the discussion from Nodejs hosting with Hetzner on KonsoleH:

Used the following from the above post in .htaccess file and my index.js opens up fine(just a button).

    DirectoryIndex disabled
    RewriteEngine On
    RewriteRule ^(.*)$ http://localhost:3000/$1 [P,L]
    RewriteRule ^$ http://localhost:3000/ [P,L]

Clicking on a button should open the register page but I get:

{"status":"404","message":"/register not found."}

Works on my local dev environment. Anyone has pointers as to why it would not work on hosted environment?

Community Page
Last updated: