1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
This guide explains how to use Node.js with a managed Cloud Server.
Please contact our support team from an email address in your client account, telling us:
- the hosting where you want to install Node.js
- the version you want (e.g., 6.3.0)
We will then install NVM (Node Version Manager) as the manager of the Node.js version
To install Node.js via NVM:
To start the loop server (server.js contains server.listen(4040)):
forever start server.js
To redirect apache traffic to the backend of Node.js, add this to your .htaccess file:
RewriteRule ^(.*)$ http://localhost:4040/$1 [L,P]
Changing versions of Node.js
Set 6.1.0 (or another version) as default
nvm alias default 6.1.0