Skip to content

ONSdigital/business-index-ui

Repository files navigation

bi-ui

phase license

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.

Table of Contents

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

Environment Setup for the UI

Install NPM, it is included with Node.js (Download)

Running the UI:

Clone this repo and install dependencies

git clone https://github.com/ONSdigital/bi-ui.git
cd bi-ui
npm install

Development Setup

  1. Start the React.js development server (which uses hot reloading):
npm run start:react
  1. Start the Node.js server:
npm run start:server
  1. Go to localhost:3000 to see bi-ui.

Docker Setup

  1. Build and run the UI inside a Docker container.
docker build -t bi-ui .
docker run -p 3001:3001 bi-ui
  1. Go to localhost:3001 to see bi-ui.

Running the API

elasticsearch
sbt "api/run -Denvironment=local"

Testing

Running npm test will run all the unit, server and load tests.

Useful Extensions

Logging into the UI

Username and password are test or admin.

Login credentials for DEV, TEST and BETA

The login to the UI deployed to CF is handled differently. Relevant documentation can be found on Confluence.

Contributing

See CONTRIBUTING for details.

License

Copyright ©‎ 2017, Office for National Statistics (https://www.ons.gov.uk)

Released under MIT license, see LICENSE for details.