Enabling Node.JS (Linux Cloud/Shared plans) Print

  • 0

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 ^$ [P,L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$$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

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

Was this answer helpful?

« Back