This repository is the home of the RADAR (Rare Disease Registry) web interface. The application is built using the AngularJS framework and bundled for browsers using webpack. The application communicates with the RADAR API.
Make sure you have Node.js and npm installed (npm is included with Node.js).
Clone the repository:
git clone https://github.com/renalreg/radar-client.git
cd radar-client
Install the dependencies:
npm install
Start the development server:
npm start
The development server is available at http://localhost:8080/ and with live reloading at http://localhost:8080/webpack-dev-server/.
start
- start the development server.clean
- remove build output.build
- build the client in thedist
folder.lint
- lint the source code with ESLint.test
- run the tests with Karma.sauce-labs
- run the tests on all supported browsers using Sauce Labs.
Run the development server with the npm start
command.
This will start a development server listening on http://localhost:8080/
.
If you are using a VM you might want to listen on all interfaces with the --host 0.0.0.0
argument.
You can pass extra arguments to npm start
using the --
separator.
For example npm start -- --host 0.0.0.0
.
The development server proxies requests to /api
to the API running on localhost:5000
.
The code is automatically linted and tested by Travis CI.
Lint errors or test failures will prevent a package being built with ./build.sh
.
The JavaScript code can be linted with the ESLint tool. The coding style is two-spaces for indentation, single-quotes, and semi-colons.
Lint the code with:
npm run lint
The tests are written using the Jasmine framework and run using Karma.
Test files have the .test.js
extension and are normally named after the file they are testing.
Run the tests with:
npm test
A HTML coverage report is saved to the coverage/html
directory.
Bump the version in package.json
and git tag
the commit. Checkout national (for
national/demo/staging radar version) or international (for international version) branch and
merge master changes to it.
Build a .tar.gz
:
./build.sh
This will lint the code, run the tests, build the client and create an archive ready for distribution.
The client will be built in production mode (NODE_ENV=production
) which will minify the output.
Deploy the .tar.gz
to servers:
virtualenv venv
. venv/bin/activate
pip install fabric
fab -H nww.radar.nhs.uk -u root deploy
The --gateway
option is useful for tunneling through another server.
RADAR supports the following browsers:
- Chrome
- Firefox
- Internet Explorer 9+ (we recommend using Internet Explorer 11)
Browser usage on RADAR in August 2016 was:
Browser | Usage % |
---|---|
Chrome | 41.1% |
Internet Explorer 11 | 27.8% |
Internet Explorer 8 | 13.9% |
Internet Explorer 9 | 7.3% |
Firefox | 6.6% |
Internet Explorer 10 | 3.3% |
Copyright (c) 2019 UK Renal Registry.
Licensed under the AGPL license.