clp
clp copied to clipboard
log-viewer-webui: Serve client using server in production; Add npm scripts to setup, lint, and start client and server together during development.
Description
This PR:
- Adds code to serve the client (from
CLIENT_DIR
) using the server, but only in production mode.- For ease of development, in development mode, the client will be served using a webserver that supports hot module replacement.
- When the client is updated to call server APIs, we will pass in an env var which indicates the server's address.
- Adds npm scripts to init, lint, and run the client and server together.
- Updates the docs about the points above.
- Applies the linter to fix some violations from #468.
Validation performed
Validated all the new npm scripts work.