The bi-ui
allows a user to query the business-index-api. This project uses React.js and Redux on the frontend and Node.js for serving the static React.js files and for managing user sessions.
The following tutorials were used to help with the deployment using Node.js and the login with redux: Node and Login.
1. Environment Setup
2. Running the UI
3. Running the API
4. Testing
5. Useful Extensions
6. Logging into the UI
7. Contributing
8. License
Install NPM, it is included with Node.js (Download)
Clone this repo and install dependencies
git clone https://github.com/ONSdigital/bi-ui.git
cd bi-ui
npm install
- Start the
React.js
development server (which uses hot reloading):
npm run start:react
- Start the
Node.js
server:
npm run start:server
- Go to localhost:3000 to see bi-ui.
- Build and run the UI inside a Docker container.
docker build -t bi-ui .
docker run -p 3001:3001 bi-ui
- Go to localhost:3001 to see bi-ui.
elasticsearch
sbt "api/run -Denvironment=local"
Running npm test
will run all the unit, server and load tests.
-
Advanced REST Client - for testing Node routes
-
React Developer Tools - for viewing props & state of React components
-
Redux DevTools - for seeing what is happening in your Redux store
Username and password are test
or admin
.
The login to the UI deployed to CF is handled differently. Relevant documentation can be found on Confluence.
See CONTRIBUTING for details.
Copyright © 2017, Office for National Statistics (https://www.ons.gov.uk)
Released under MIT license, see LICENSE for details.