hkennyv / mqtt-debugger

A small react web app to test mqtt communication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mqtt-debugger

author(s): khuynh, rokamura

Description

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.

app terminal

Usage

Cloning the Repository

First, clone the repository

git clone git@bitbucket.org:hkennyv/mqtt-debugger.git

Install deps

Second, change directories into the cloned folder and run the following command to install the dependencies:

for npm

npm install

for yarn

yarn install

Configure .env

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)

Build webapp

Lastly, build the webapp using npm/yarn.

npm build
yarn build

Hosting

Lastly, serve the webapp through your preferred method. Using serve is recommended for simple local hosting.

About

A small react web app to test mqtt communication


Languages

Language:JavaScript 83.5%Language:HTML 9.7%Language:CSS 6.8%