Simple API to build your own MQTT server on top of it.
npm install mqtt-server --saveLaunch all available servers:
var fs = require('fs'); var mqtt = require('mqtt-server'); mqtt.startServers({ ssl: { key: fs.readFileSync('./server.key'), cert: fs.readFileSync('./server.crt') }, ports: { mqtt: 9001, mqtts: 9002, ws: 9003, wss: 9004 } }, function(client){ // the client handler client.connack({ returnCode: 0 }); }, function(){ console.log('listening'); });mqtt-server is an OPEN Open Source Project. This means that:
Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the CONTRIBUTING.md file for more details.
mqtt-server is only possible due to the excellent work of the following contributors:
| Joël Gähwiler | GitHub/256dpi | Twitter/@256dpi |
|---|---|---|
| Matteo Collina | GitHub/mcollina | Twitter/@matteocollina |
| Adam Rudd | GitHub/adamvr | Twitter/@adam_vr |
MIT
