## BOLO v.14.0 Install & Maintenance Guide

### Software requirements to run BOLO

- Install Visual Studio Code: Visual Studio Code
- Install IntelliJ: IntelliJ IDEA
- Install Eclipse: Eclipse for Java developers
- Install node.js and npm: How to install node and nmp in Windows and Mac
- Install SQL Server: How to install SQL Server on Windows or How to install SQL Server on Mac
- Install SSMS (ONLY FOR WINDOWS): SQL Server Management Studio

- Create a sa (system admin) username and password

- Create a database with the same name than the one you are going to use in application-dev.properties in the spring.datasource.url

- Make sure that the username in spring.datasource.username is the same than the username used when you created the user in SSMS

- Make sure that the password in spring.datasource.password is the same than the password used when you created the user in SSMS

- Open in Visual Studio Code the BOLO-Client folder (Angular front-end) and run in the terminal or in a command prompt these commands:

- Verify if node is installed: node -v

- Verify npm version: npm -v

- Verify Angular CLI version: ng --version

- Install Angular CLI: npm install -g @angular/cli

- Open in IntelliJ the BOLO-API folder (Spring Boot back-end)and go to file application-dev.properties

- Make sure that the database name in spring.datasource.url is the same than the name used when you created your database in SSMS

- Make sure that the username in spring.datasource.username is the same than the username used when you created the user in SSMS

- Make sure that the password in spring.datasource.password is the same than the password used when you created the user in SSMS

- Run in IntelliJ the BOLO-API project (Spring Boot back-end)
- Run in VSC the BOLO-Client project (Angular front-end)

- Open terminal and run this command (local environment): ng serve

- Open terminal and run this command (production environment in the server): ng serve --port 443 --host 0.0.0.0 --ssl true --ssl-key C:\\Users\\fiustudents\\Documents\\BOLO\\bolo2019-Fall-Backup\\bolo2019-Fall\\BOLO_CLIENT\\certificates\\www.samjr.org_private_key.key --ssl-cert C:\\Users\\fiustudents\\Documents\\BOLO\\bolo2019-Fall-Backup\\bolo2019-Fall\\BOLO_CLIENT\\certificates\\www.samjr.org_ssl_certificate.cer --disable-host-check

### Useful commands

If you are faced with an issue when running the Client, versions incompatibility may be the reason. We struggled with this before and used the following commands to solve it:

1: npm install

2: npm install -g @angular/cli@6.1.1

3: npm uninstall @angular-devkit/build-angular

4: npm install @angular-devkit/build-angular@0.12.4

5: npm update

6: npm install typescript@">=3.1.1 <3.3.0"

7: npm install node-sass@4.12

If you are faced with this error "Failed to start component [Connector[HTTP/1.1-80]" when running the API in IntelliJ:

- Try solving by changing the port number in application.properties

### Certificate

- Product Owners own a certificate issued by a CA (certified authority) for domain samjr.org. The following are things you may want to know about the certificate

- Find the certifate files in the following locations in the Product Owner's Windows Server:

- BOLO_API\src\main\resources\bolokeystore.p12

- BOLO_CLIENT\certificates\samjr.org_private_key.pfx & BOLO_CLIENT\certificates\www.samjr.org_ssl_certificate

- We ran into a lot of issues to make the application HTTPS but in summary this link may give you an idea of the basic steps we followed: Install a trusted root certificate

- The certificate only works for domain samjr.org. If you want to enable HTTPS for you localhost environment you can use the following reference for guidance to create a self-signed certificate:

- Enable HTTPS in an Angular application

- Enable HTTPS in a Spring Boot application

## Thank you!