2.5 KiB
Contributing
How-To
Contribute code
- Install the dependencies.
- Start the wasmCloud host using the
washCLI. Read more about it here.- Ensure the NATS service is running with the websocket listener enabled.
- Start a local frontend development server. Read more about it here.
- Make changes to the UI.
- Commit your changes.
- Open a pull request.
- Wait for the CI to pass.
- Wait for a maintainer to review your changes.
- Wait for a maintainer to merge your changes.
- 🚀 🏁 Done
Install dependencies
Enable corepack and install yarn using the following commands:
# optional, run only if you haven't enabled corepack before
corepack enable
yarn install
Building ts files
Run the following command to build typescript files in @wasmcloud/.. workspace package to avoid the following error:
Unable to resolve path to module '@wasmcloud/lattice-client-react' import/no-unresolved
yarn run turbo:build
Start a local UI development server
Run the following command to start a local frontend development server:
yarn run dev
Start the wasmCloud Host using wash CLI
Run the following command to start the wasmCloud host using the wash CLI:
wash up
Explanations
NATS
wasmcloud uses NATS as its message broker. The wash CLI can be used to start a local NATS
or connect to an existing NATS server.
The Washboard UI connects to a NATS server at ws://localhost:4223 by default, although this can be overridden via the UI.
You can spawn the NATS server with a wasmCloud Host and wadm with the wash cli tool. See the documentation for installation instructions.
wash up
You can change the NATS websocket port using the
--nats-websocket-port flag or NATS_WEBSOCKET_PORT environment variable. Note that you must stop the NATS Server to make this change. For example:
# 1. Make sure NATS is stopped
wash down
# 2. Start NATS with the new port
wash up --nats-websocket-port 4001
# or
NATS_WEBSOCKET_PORT=4001 wash up
Otherwise, verify the port you are using to connect to the NATS server. Visit NATS Websocket Configuration for more information.