Skip to content

penguineer/cleanURI-webui

Repository files navigation

cleanURI - Web UI

NodeJS Test Docker Image

This is the Web UI for the cleanURI service.

Partial screenshot of the Web UI

Configuration

The Docker container can be configured using environment variables:

  • REACT_APP_API_GATEWAY: URL to the API Gateway (default: http://localhost:8080)

Please note that this configuration is not available when the app is run locally. In this case configuration variables will have their default values.

Development

The Web UI is based on React and requires NodeJS > 14. Debian packages can either be downloaded on the NodeJS website or are available from the backports repository.

Run with npm

In the project directory, you can run:

npm start

This runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.

The page will reload when you make changes.
You may also see any lint errors in the console.

Run tests

In the project directory, you can run:

npm test

This launches the test runner in the interactive watch mode.
See the section about running tests for more information.

Deployment

The current version expects an API Gateway running at localhost:8080. This location will be part of the application configuration in future releases.

Run with Docker

An HTTP daemon serving the static content can be run as follows:

docker run --rm \
  -e REACT_APP_API_GATEWAY="api gateway uri" \
  -p 8080:80 \
  mrtux/cleanuri-webui

Note that the default API gateway points at http://localhost:8080/ and therefore will not be available in the Docker container. Please don't forget to set a working URL for the API Gateway here.

Build with npm

In the project directory, you can run:

npm run build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

Maintainers

Contributing

PRs are welcome!

If possible, please stick to the following guidelines:

  • Keep PRs reasonably small and their scope limited to a feature or module within the code.
  • If a large change is planned, it is best to open a feature request issue first, then link subsequent PRs to this issue, so that the PRs move the code towards the intended feature.

License

MIT © 2022 Stefan Haun and contributors