Skip to content

Latest commit

 

History

History
48 lines (39 loc) · 1.33 KB

README.md

File metadata and controls

48 lines (39 loc) · 1.33 KB

Incidents Front

tests codecov

This project contains the Typescript front-end client used with the Incidents API project.

It can:

  • Login/Logout
  • Create new Incidents via a dedicated form
  • List and search all incidents
  • CRUD incidents
  • Dashboard with metrics

Usage

$ yarn install
$ echo "REACT_APP_API_URL=http://..." >> .env
$ yarn cypress:run
$ yarn start

You may also run the automated Cypress test suite.

# Provide the login credentials in your environment:
$ echo "CYPRESS_INCIDENTS_USER=..." >> .env
$ echo "CYPRESS_INCIDENTS_PASSWORD=..." >> .env
# Run the test suite headlessly
$ yarn cypress:run
# Run the test suite in Cypress browser
$ yarn cypress:open

Production build

This repository contains a Dockerfile that will make a production build of the application then run it in Nginx. The build step is not aware of where to find the API that this client implements. You must mount the env.js file at runtime in the application build directory:

// build/env.js
window.env = {
    "API_URL": "<your Incidents API endpoint>"
}