Backend deployment
login to server
move to folder location
check code changes - git status
Remove local changes - git stash
git pull
check the connection in  - /var/www/html/erpx/apps/services/config.ts
test all the modules
remove services folder - cd dist/apps
                         rm -r services
build all the modules - nx run services-masters:build
cd dist/apps/services/module_name
run pm2 - pm2 start main.js --name 'module_name'

Example
pm2 list 
pm2 delete dev_logistics dev_masters dev_procurement dev_sales dev_warehouse
cd /var/www/html/erpx_dev
cd node_modules/
rm -r .cache
cd ..
cd dist/apps/services/
rm -r logistics/ masters/ procurement-service/ warehouse-service/
cd sale-service/
rm -r assets/ main.js main.js.map
cd /
cd /var/www/html/erpx_dev
git pull
//check configurartions in apps/services/config.ts
nx run services-masters:serve
nx run services-masters:build
cd dist/apps/services/masters/
pm2 start main.js --name 'dev_masters'



//do below process for all modules individually

nx run services-masters:serve
nx run services-masters:build
cd dist/apps/services/masters
pm2 start main.js --name 'dev_masters'

//front 

front end do from local system using vs code
git pull
check config.ts
remove dist/apps/ui/ui-masters-ui
nx run ui-masters-ui:build
delete files in /var/www/html/dev using filezilla
upload ui-masters-ui folder in /var/www/html/dev u*+ -sing filezilla
nx run ui-masters-ui:build

nx run services-masters:build --prod
nx run services-sale-service:build --prod
nx run services-procurement-service:build --prod
nx run services-warehouse-service:build --prod
nx run services-logistics:build --prod
nx run services-transportation:build --prod
nx run services-backend:build --prod
nx run services-hrms:build --prod
nx run services-production:build --prod
nx run services-raw-material-procurement:build --prod
nx run services-planning:build --prod
nx run services-analytics:build --prod
nx run services-job-management-api:build --prod
nx run services-job-management:build --prod
nx run services-asset-management:build --prod
nx run services-user-logs:build --prod
nx run services-canteen-management:build --prod
nx run services-vms:build --prod