Project

General

Profile

1
# UOA Repository Manager UI
2

    
3
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.8 (Angular version 6.1.10).
4

    
5
## Minimum requirements for installing and building the project
6

    
7
[Node.js](https://nodejs.org/en/) version 8.x or 10.x.<br>
8
[npm client](https://docs.npmjs.com/cli/install) command line interface (it is installed with Node.js by default).
9

    
10
## Installing the project
11

    
12
After checking out (or updating) the repository enter the created folder and run `npm ci`.
13
This will install the exact versions of the dependencies as mentioned in the `package-lock.json` file (inside the root folder).
14

    
15
## Build for production
16

    
17
Run `npm run build` (equivalent of `ng build --prod`) to build the project. The build artifacts will be stored in the `dist/uoa-repository-manager-ui` directory.
18

    
19
## Deploy project to nginx server
20

    
21
Run `tar -czvf dist.tar.gz dist/` to generate a compressed `.gz` file containing the built angular folder<br>
22
Run `scp dist.tar.gz path/to/server/` to copy the compressed file to the server.<br>
23
Connect to server (`ssh user@server.ip.address`).<br>
24
Uncompress `dist.tar.gz` file.<br>
25
Navigate to the root folder of the server.
26
Copy the contents of the uncompressed dist/uoa-repository-manager-ui folder
27
into the `uoa-repository-manager-dashboard` folder (superuser privileges are normally required for this action).<br>
28

    
29
## Other topics  
30
### Development server
31

    
32
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.<br>
33
Run  `npm run start:proxy` (equivalent of `ng serve --proxy-config proxy.conf.json`) instead, to run the project using a development proxy. To configure the proxy modify the `proxy.conf.json` file (inside the root folder).
34

    
35
### Code scaffolding
36

    
37
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
38

    
39
### Running unit tests
40

    
41
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
42

    
43
### Running end-to-end tests
44

    
45
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
46

    
47
### Further help
48

    
49
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
(4-4/10)