OperationsGateway - user interface for operational data
To start development, you will need to create a .env.development.local
file based on the .env.development
template.
You should fill this in with the credentials of the user you would like to login as to your operationsgateway-api
instance.
You will also need to create an public/operationsgateway-settings.json
file based on public/operationsgateway-setting.json
.
To use the MSW mock endpoints, keep apiUrl
as an empty string, otherwise insert the URL of an operationsgateway-api
instance.
This project uses Vite.
In the project directory, you can run:
This will install all the project dependencies. Running yarn install
at the top
level initialises all the packages, and you will be ready to start development in any of them!
Runs the dev
script, which runs the app in development mode.
Open http://localhost:3000 to view it in the browser.
Runs unit tests
Runs the cypress e2e tests which run against mock data
Runs the playwright e2e tests which run against mock data (requires Docker)
Runs the playwright e2e tests which run against real data (requires Docker). You should ensure your settings file is pointing at a server and is not using the mocks.
Lints the code. Linting should also automatically run on commit via Husky & lint-staged
Builds the app for production to the dist
folder.\
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about building for production for more information.
Deploys a static version of the build from the dist
directory to port 5001. Use yarn preview:build
to build and preview it in SciGateway.
For development purposes, use yarn preview:build:dev
to build in watch mode so that changes are built automatically.