integreat-transporter-mqtt
Version:
MQTT transporter for Integreat
64 lines (45 loc) • 1.18 kB
Markdown
Requires node v18 and Integreat v1.0.
Install from npm:
```
npm install integreat-transporter-mqtt
```
Example of use:
```javascript
import Integreat from 'integreat'
import mqttTransporter from 'integreat-transporter-mqtt'
import defs from './config.js'
const great = Integreat.create(defs, {
transporters: { mqtt: mqttTransporter },
})
// ... and then dispatch actions as usual
```
Example service configuration:
```javascript
{
id: 'store',
transporter: 'mqtt',
options: {
transporter: {
uri: 'mqtts://somemqtt.io',
key: 'svein',
secret: 's3cr3t',
topic: 'mqtt/demo'
}
}
}
```
The tests can be run with `npm test`.
Please read
[](https://github.com/integreat-io/integreat-transporter-mqtt/blob/master/CONTRIBUTING.md)
for details on our code of conduct, and the process for submitting pull
requests.
This project is licensed under the ISC License - see the
[](https://github.com/integreat-io/integreat-transporter-mqtt/blob/master/LICENSE)
file for details.