Links

Multi Server Deployment

The use of multi server system in the business generally helps guarantee high performance and uptime, sustain security, and enables more efficient resource allocation.
For Multi server Deployment, we have to follow the same steps that we did in single server deployment. Only the Build will be different. E.g., if you are trying to deploy admin API only in separate server, then you can make a build of admin part only, as we have shown below. You can implement this in your local setup and then move that 'dist' to server.

Store API Deployment

store build command for api

$ npm run storeBuild
Run command for running node application in server
$ NODE_ENV=production node dist/src/app.js
$ sudo NODE_ENV=production forever start dist/src/app.js
After api runs successfully, open browser and give http://ip address/backend/apidoc/ will be able to see apidoc, which implies you that api installed in server

Admin API Deployment

Admin build command for api

$ npm run adminBuild
Run command for running node application in server
$ NODE_ENV=production node dist/src/app.js
$ sudo NODE_ENV=production forever start dist/src/app.js
After api runs successfully, open browser and give http://ip address/backend/apidoc/ will be able to see apidoc, which implies you that api installed in server

Vendor API Deployment

Vendor build command for api

$ npm run vendorBuild
Run command for running node application in server
$ NODE_ENV=production node dist/src/app.js
$ sudo NODE_ENV=production forever start dist/src/app.js
After api runs successfully, open browser and give http://ip address/backend/apidoc/ will be able to see apidoc, which implies you that api installed in server