NOTE: Always use Yarn. All things related to package management are done using Yarn. Make sure to never commit a package-lock.json
because it means you used npm.
To build and deploy a new version for the UI, you need to be on the master branch.
- Change the version in
package.json
to reflect the new version. - Stage changes
git add .
- Commit changes
git commit -m "vX.Y.Z"
- Tag the release
git tag vX.Y.Z
- Push both tags and commits
git push && git push --tags
Following this, you can go the actions section on the repo and watch the build. If the build is successful, you can go to the releases section and see the new draft, and publish it.
Some notes related to how I setup mqtt-react
locally.
Using mosquitto as the broker, make sure you add websockets transport to the conf file.
...(mosquitto.conf)
listener 8083
protocol websockets
...snip...
This isn't enough. Adding this to the end of the mosquitto.conf
file allows us to register an extra listener by websockets but it breaks mosquitto for some reason. Make sure to uncomment the default listener in the conf file as well. The file should look something like this disregarding all the comments.
port 1883
listener 8083
protocol websockets
This makes sure that a listener with the mqtt protocol is available on port 1883 by default.
If you're using the testServer in the repo to test localhost connection, make sure to sure to have these two lines.
mqttc = mqtt.Client(transport='websockets')
mqttc.connect("localhost", port=8083)
Using the mqtt-react
library (wildly outdated, need to update), make sure you set the connection url to ws://localhost:8083
given you followed the config above.