Deployment
Project Extraction
-
First you have to extract the
whoxa.zipthen you will get three zip files.- whoxa_admin.zip
- whoxa_frontend.zip
- whoxa_backend.zip
-
On Extracting
whoxa_backend.zipyou will get- automate.sh
- auto_deploy.zip
-
On Extracting
auto_deploy.zipyou will get- some files related to Automation
- whoxa.zip
-
Upload
whoxa.zipto a location where you want to deploy Project using FileZilla -
/var/www/whoxa(This is the recommended location) -
Install unzip to
unzipthe Project . Run following command to install unzip
sudo apt install unzip
Configurations
- After the extraction you will see the Project files
Config file
-
Make a
config.jsoninsideconfigfolder of Project And add following content as per you MySQL and Server Configuration{
"development": {
"username": "root",
"password": "root@123??",
"database": "whoxa",
"host": "127.0.0.1",
"dialect": "mysql"
},
"test": {
"username": "root",
"password": null,
"database": "database_test",
"host": "127.0.0.1",
"dialect": "mysql"
},
"production": {
"username": "root",
"password": null,
"database": "database_production",
"host": "127.0.0.1",
"dialect": "mysql"
}
}
ENV file configurations
- Make a
.envfile in the project on folder which containpackage.jsonwith following content.
TWILIO_AUTH_TOKEN=""
TWILIO_FROM_NUMBER=""
TWILIO_ACCOUNT_SID=""
baseUrl="http://{your_server_ip}:{port_on_which_server_is_running}"
Server Starting
- Open Terminal on the location where
package.jsonis located. - Run following command to install dependencies
npm install
- After successful running of
npm installinstall global dependency to auto configure the DB related tasks by running following command.
npm install -g sequelize sequelize-cli
- To install PM2 Globally
npm install -g pm2
- To run server run following command within the terminal where
package.jsonis located.
pm2 start index.js
- If you want to test on local machine then run following command.
node index.js
Peer Js installation
- Install
PeerJSglobally
npm install -g peer
- Run following command to run
peerserver on port 4001
pm2 start "peerjs --port 4001" --name "peerjs-server"
- If you want to test on local machine then run following command.
peerjs --port 4001
Auto restart on server reboot
- Run following command to save all the process running on pm2
pm2 save
- Run following command to restart all the saved processes on server restart
pm2 startup systemd
- Run following command to see running pm2 processes
pm2 status
- Run following command to see logs of a process
pm2 log {index}
Open webpages
Search following URL to see Frontend
http://{your_server_ip}:{port_on_which_server_is_running}/
- First it will show verification page

After verification it will show this page

Search following URL to see Admin Panel
http://{your_server_ip}:{port_on_which_server_is_running}/admin
