Deploy Api-Server, Admin Webdashboard, Mobile App(Rider/Driver) in Production
Api server
Installation steps
Clone the app
Step1: Go to ApiServer folder
- Enter
npm i
Step2: Export node environment by export NODE_ENV=production
Do check if it is set by echo $NODE_ENV
it Prompts as production.
Step3: Enter npm run build
Step4: Run forever now enter forever start dist/index.js
Check if forever is running by entering forever list
Common issues npm ERR! bcrypt
You need to enter npm install --save bcrypt-nodejs && npm uninstall --save bcrypt
Admin Dashboard
Generic
Clone the app
Step1: Go to Webdashboard folder and enter npm i
Step2: Go to react folder and enter npm run build
Step3: Now change the URL and port number
- Goto WebDashboard folder then react/src/services/apiConfig.js and change the server side ur: IP address or the URL”, Port: “port number”.
port: 3010 // incase of running api-server (node app) in development
port: 3066 //incase of running api-server (node app) in production
port: 443 //incase of running api-server (node app) on heroku
Step4: In react folder run npm run build
Step5: Go to Webdashboard folder run forever start server/index.js
Heroku
Step1: Enter in Terminal cd Webdashboard/
Step2: Enter git init
Step3: Enter heroku create
Ignore this step if you have already generated it from Heroku Dashboard
Step4: Enter git remote origin https://git.heroku.com/<AppName>.git
Step5: Enter git add
Step6: Enter git commit -m "Your Message Here"
Step7: Enter git push heroku master
Mobile App(Rider/Driver)
Make sure you have a developer account on the Play Store / App Store.
To deploy on the App store(ios) follow the links
• Generating Certificates follow here
• Releasing build and publish app link
To deploy on Play store(Android) follow the link
• Building signed apk follow here
• Releasing build and publish app link