Submit a Ticket
Support Center » Knowledgebase » Enabling Node.JS (Linux Cloud/Shared plans)

Enabling Node.JS (Linux Cloud/Shared plans)

Our Mocha, and WordPress Premium + Advanced packages offer support for NodeJS (Any accounts purchased since January of 2018).

Its easy to integrate NodeJS application to a web server via .htaccess. You should replace PORT with the port on which your NodeJS application listens.

1. Login to the Cpanel.




2. Choose the File Manager.




3. Edit your .htaccess file.



4. Add the following lines and click Save:

  RewriteEngine On
  RewriteRule ^$ http://127.0.0.1:PORT/ [P,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ http://127.0.0.1:PORT/$1 [P,L]


  • Unused port should be selected for NodeJS application (Recommended RANGE: 40000 - 65535)
  • The .htaccess files can be created under every domain/sub-domain or folder
  • If the NodeJS application fails to start, select a new port from the above range
  • Each NodeJS application listens on its own port which is configured in the code

PS:
Currently this functionality is available for our Mocha + WP Premium/Advanced plans purchased since January of 2018.

 This answer was helpful  This answer was not helpful
 Back