mqtt-server
mqtt-server copied to clipboard
Simple API to build your own MQTT server on top of it.
``` // Server const mqttServer = require('mqtt-server'); const servers = mqttServer({ mqtt: 'tcp://localhost:1883', mqtts: 'ssl://localhost:8883', mqttws: 'ws://localhost:1884', mqtwss: 'wss://localhost:8884' }, function(client){ client.connack({ returnCode: 0 }); }); servers.listen(function() { console.log('listening!'); });...
``` servers.listen(function(){ ^ ReferenceError: servers is not defined at Object. (/home/karl/dev/javascript/sandbox.js:16:1) ``` Example code is not complete!