The front end for the Research Hub, built with Angular and Angular Material.
Follow steps 1 and 2 in the research-hub-deploy README.
To experience the full functionality of the app, you also need to run research-hub-api and research-hub-db whilst developing. Follow the instructions on the following pages:
Navigate to the research-hub-web folder (this command assumes you're in the research-hub-deploy
folder):
cd build/research-hub-web
Install dependencies:
npm install
Then run npm run start
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you
change any of the source files.
To test run the app in production mode, run npm run test-prod
.
Run npm run ng generate component component-name
to generate a new component. You can also use npm run ng generate directive|pipe|service|class|module
.
Run npm run build
to build the project. The build artifacts will be stored in the dist/
directory.
Run npm run build-prod
to build the project in production mode.
You can also visualise the size of the webpack output files with webpack bundle analyzer,
an interactive zoomable treemap. To do this, once the build has finished, run npm run bundle-report
.
This project comes bundled with an interactive test runner capable of launching your:
e2e tests
Simply run ./test.sh
to specify the sort of testing you would like to do.
Note: if you wish to use BrowserStack automated e2e testing you must store your BrowserStack credentials in a file ./e2e/browserstack-credentials.json
in the format:
{
"USER": "BrowserStack-username-here",
"KEY": "BrowserStack-api-key-here"
}
Run npm run test
to execute the unit tests via Karma.
Run npm run e2e
to execute the end-to-end tests via Protractor.
Before running the tests make sure you are serving the app via npm run start
.
Run npm run compodoc
to generate new documentation via Compodoc.
To get more help on the Angular CLI use npm run ng help
or go check out the Angular CLI README.