Following are the steps to install Visionhelpdesk’s Livechat on Linux server:
Install nodejs [version 12.x]
Install npm [vesion 6.x]
Install pm2 [version 3.5.x]
curl -sL https://rpm.nodesource.com/setup_12.x | bash - yum -y install nodejs yum install gcc-c++ make npm install pm2@latest -g
Copy server.js, router.js and package.json on root or /
Go to the path where package.json is copied
Execute the command
npm install
Set the reverse proxy as below
<Location /chat > ProxyPass http://127.0.0.1:3000 ProxyPassReverse http://127.0.0.1:3000 </Location>
#pm2 start server.js
Note: If port 3000 is already in use then need to create .env file at the same location where server.js is stored and put the port as below in that file:
PORT=3001 virtualDirPath=''
Also, make the changes in reverse proxy accordingly.