An open API service indexing awesome lists of open source software.

https://github.com/medilies/mqttjs-client-example


https://github.com/medilies/mqttjs-client-example

client logging mqtt mqttjs template

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# MQTT.JS client example

## Setup

```bash
git clone https://github.com/medilies/mqttjs-client-example
```

```bash
cd mqttjs-client-example
```

```bash
npm install
```

```bash
cp .env.example .env
```

- Edit `.env`.
- Edit `sub_topics.json`.

## Usage

Start a broker. For example:

```bash
mosquitto -p 1883 -v
```

Start the client:

```bash
npm start
```