This is an experiment in creating a web applicaton for the brennan b2 using more modern technology.
For the time being, the principles and scope of this project are aligned toward replicating the existing functionality and appearance of the original web application.
This project was generated with Angular CLI version 7.1.2.
Getting the code and install dependencies
Clone this repository,
cd into the
brennan-app folder and run the usual
CORS policy workaround
Note: In order for the developent server to communicate with the brennan web service, it is neccessary to first modify the
lighttpd.conf file in
/var/www to support CORS. This should not be necessary in a production deployment of this web application. The root folder of this project contains an example
lighttpd.conf file to do this and which can be copied to the brennan
/var/www folder. The brennan web server must be re-started.
Updating the lighttpd.conf file
The copy can be performed with the following command from the
The actual IP address you should use is displayed in the brennan b2.
scp lighttpd.conf firstname.lastname@example.org:/var/www
When propted for a password, type
Stopping and starting the brennan web server
To stop and start the brennan application:
lighttpd -D -f /var/www/lighttpd.conf
Launching this Web Application server locally
ng serve for a dev server. Navigate to
http://localhost:4200/. The app will automatically reload if you change any of the source files.
You can also run
ng serve --open, which will automatically open the browser.
I recommend using the excellent (and free) Visual Studio Code editor fo development work.
ng build to build the project. The build artifacts will be stored in the
dist/ directory. Use the
--prod flag for a production build.
Running unit tests
ng test to execute the unit tests via Karma.
Running end-to-end tests
ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use
ng help or go check out the Angular CLI README.