Skip to content

A node.js MQTT broker app with data storage in MongoDB.

License

Notifications You must be signed in to change notification settings

MarkNjunge/mqtt-broker

Repository files navigation

MQTT Broker

A node.js MQTT broker app with (optional) data storage in MongoDB.

For an explanation of MQTT, see MQTT Essentials.

Installation

  1. Clone the repository and install the dependencies
git clone https://github.com/MarkNjunge/mqtt-broker.git
  1. Install dependencies
yarn install
  1. Create a .env file similar to .env.sample in the root directory.
cp .env.sample .env
  1. Run the broker
yarn start

Usage

Connect to the broker using the url mqtt://localhost:1883 using a client app such as MQTTBox.

To attach the broker to a http server, set ATTACH_HTTP to true and HTTP_PORT to your desired port. Then connect to ws://localhost:3000

Built with

About

A node.js MQTT broker app with data storage in MongoDB.

Resources

License

Stars

Watchers

Forks

Packages