What you’ll need
- An ngrok account.
- The ngrok agent installed.
- MQTT Explorer.
- The Mosquitto binary for your operating system.
1. Start an MQTT server
For this tutorial, use the Eclipse Mosquitto quickstart available on GitHub. Start the server by running this command in your terminal:1883.
You’ll see output like this:
2. Launch ngrok
Once your app is running successfully on localhost, you can put it online securely using ngrok. Go to the ngrok dashboard and copy your auth token. Start ngrok by running the following command:3. Integrate MQTT Explorer
Open MQTT Explorer and click the plus sign to create a new MQTT connection. Enter the TCP address from the last step and click Connect. You’ll see a few new lines in your MQTT server logs:example/topic.
You’ll see the message in the terminal tab where you subscribed to the topic: