hres / cfg-classification-webapp

Canada Food Guide Classification WebApp
https://lam-dev.hres.ca/cfg-classification-webapp
MIT License
0 stars 1 forks source link

Cfg Classification Webapp

This project is the user interface for the CFG-Classification IP346b initiative. It is an Angular front end that interfaces with Java Rest services.

Prerequisites

Building this project requires the following.

-git
-npm (see section Installing NodeJS and NPM below)
-angular CLI

Deploying this project requires:

-Apache2

Instructions for setting up Apache for HTTPS and some scripts for creating all the required certs can be found at: https://github.com/hres/cfg-classification-keycloak/tree/master/scripts/ssl#how-to-configure-apache and https://github.com/hres/cfg-classification-keycloak/tree/master/scripts/ssl/apache2

Installing NodeJS and NPM

*Note:  If you are installing on a Debian or Ubuntu based distrobution you will need to update your repositories.
Enter:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

Once you are pointing to v6.x repos enter:

sudo apt-get install nodejs

Install Angular CLI

sudo npm install -g @angular/cli

Git the project

git clone https://github.com/hres/cfg-classification-webapp.git

*** The latest code base is in the Keycloak branch ***

Install package dependencies

Navigate to project root and run the following.

npm install

Build CFG Classification Webapp

Run ng build -bh /cfg-classification-webapp/ to build the project. The build artifacts will be stored in the dist/ directory. Move the contents of this folder into your Apache server so that it is available at https://lam-dev.canadaeast.cloudapp.azure.com/cfg-classification-webapp/

**Note the build command to execute for a QA build is ng build -bh /cfg-classification-webapp/ -e qa

** the build command to execute for a local use build is ng build -bh /cfg-classification-webapp/ -e local