Angular Frontend application for Linux4Hope Spero-BaasBox.
-
Need to have Nodejs, NPM, AngularCLI, and Chrome installed on your system globally. This guide assumes you are running a 16.04 LTS 64bit Ubuntu system. If running a Debian/Ubuntu system and you do not have the packages installed globally, run these commands below:
sudo apt update sudo apt upgrade -y sudo apt full-upgrade -y curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt install nodejs sudo ln -s /usr/bin/nodejs /usr/bin/node sudo apt install npm sudo npm install -g npm sudo npm install -g @angular/cli sudo apt install gdebi -y wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo gdebi google-chrome-stable_current_amd64.deb --n
-
Clone this repo.
-
In the root of the project folder, run
cd l4h-app
and thennpm install
. -
Run
ng serve
for live preview in thel4h-app
directory. You can then browse the site after opening your browser to the url that the server has informed you. If you have the app in a container or through a proxy, runng serve --host 0.0.0.0 --disable-host-check
to listen to all ports and disable security checks. -
Run
ng test
to make sure the app will past some unit testing if you are making changes to the app. This is a small safety measure to make sure your changes do not have an adverse effect.ng test
will run Chrome in headless mode, however, you can have the gui view of Karma by going to port 9876 in your Chrome browser. If you like for Karma to kill it's process after tests, runng test --watch false
. Runng e2e
for additional tests.ng test
is ran by Karma andng e2e
does end to end testing using Protractor. Make sure you callng serve
and have the server running forng e2e
. When running for code coverage, runng test --code-coverage --watch false
. -
Run
ng build
to build the project. The build artifacts will be stored in thedist/
directory. Use the-prod
flag for a production build.
Note: AngularCLI made a default config file for Karma and Protractor but were edited to support Chrome in headless mode.