author(s): khuynh, rokamura
A simple react web app used for debugging mqtt communication. I initially made this to communicate and debug with my esp32 mcu. It is built using create-react-app and uses the paho.mqtt.javascript library.
First, clone the repository
git clone git@bitbucket.org:hkennyv/mqtt-debugger.git
Second, change directories into the cloned folder and run the following command to install the dependencies:
for npm
npm install
for yarn
yarn install
Rename the .env.sample
file to .env
and configure the two environment variables inside.
environment variable | description |
---|---|
REACT_APP_MQTT_BROKER | The hostname to the mqtt broker |
REACT_APP_MQTT_PORT | The port to conect to the mqtt broker (default is 11883 if websockets is enabled through broker) |
Lastly, build the webapp using npm/yarn.
npm build
yarn build
Lastly, serve the webapp through your preferred method. Using serve is recommended for simple local hosting.