# Update ESS2 Production Instance
## Building the application
**Front-end**
1. Pull to master branch.
2. Make sure environments directory is present in the `/ngx-admin` directory.
* make sure the environments directory contains 2 environments files.
* environment.prod.ts
* environment.ts
3. Configure the environment.prod.ts providing the ip addresses of the server, and the erp instance address.
4. Open terminal, run `ng build --prod` on the ngx-admin directory.
**Back-end**
5. zip the backend directory.
## Installation
6. Delete and replace the `/dist` directory content.
7. Do the same with the `/backend` directory.
8. Delete `/daemon` directory.
9. Open terminal to the backend directory and execute `node install_service.js`.
* follow the administration prompt.
10. Done.