This is an admin for OS2Display. This is based on create-react-app. See https://github.com/os2display/display-docs/blob/main/admin.md for a description of the admin.
By default the api that is requested is located at /api/
.
This can be configured by:
cp public/example_config.json public/config.json
And modify the entries to suit your setup.
{
"api": "[WHERE TO FIND THE API]"
}
This file contains the access config. This file is only required if other access setting are required than what is default.
cp public/example-access-config.json public/access-config.json
docker-compose up -d
docker-compose run node yarn
The communication with the API is generated from an OpenAPI specification with Redux Toolkit.
To regenerate (when the API specification has changed):
docker-compose exec node bash
cd src/redux/api
# Action: Replace api.json with the new api.json OpenAPI specification
# Install and run scripts to generate ned Redux Api slices.
npm install
npm start
We use cypress for testing.
To run cypress tests in the cypress container:
docker-compose run cypress run
docker-compose run node yarn check-coding-standards
docker-compose run node yarn apply-coding-standards