Log Viewer WebUI#

A webapp that allows us to serve the log-viewer and integrate it with CLP’s webui. The webapp currently consists of a React client and a Fastify server.

Requirements#

  • Node.js v20 or higher

Setup#

Install the app’s dependencies:

cd components/log-viewer-webui
(cd client && npm i)
(cd server && npm i)

Running#

To run the client during development:

npm run start

To run the server during development:

npm run start

To run the server in production:

npm run prod

In both cases, if you want to customize what host and port the server binds to, you can use the environment variables in components/log-viewer-webui/server/.env.

Testing#

To run the server’s unit tests:

npm test

Linting#

You can lint this component either as part of the entire project or as a standalone component.

Lint as part of the project#

To check for linting errors:

task lint:js-check

To also fix linting errors (if applicable):

task lint:js-fix

Lint the component alone#

To check for linting errors:

npm run lint:check

To also fix linting errors (if applicable):

npm run lint:fix