https://github.com/mqttjs/mqtt-server
Simple API to build your own MQTT server on top of it.
https://github.com/mqttjs/mqtt-server
Last synced: 9 months ago
JSON representation
Simple API to build your own MQTT server on top of it.
- Host: GitHub
- URL: https://github.com/mqttjs/mqtt-server
- Owner: mqttjs
- License: other
- Created: 2015-01-22T14:29:46.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T14:31:12.000Z (over 4 years ago)
- Last Synced: 2025-03-27T23:37:21.198Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 247 KB
- Stars: 104
- Watchers: 13
- Forks: 31
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# mqtt-server [](https://travis-ci.org/mqttjs/mqtt-server) [](http://badge.fury.io/js/mqtt-server)
Simple API to build your own MQTT server on top of it.
## Install
```bash
npm install mqtt-server --save
```
## Examples
Launch a bunch of mqtt servers (uses `create-stream-server` under the hood):
```js
var fs = require('fs');
var mqttServer = require('mqtt-server');
var servers = mqttServer({
mqtt: 'tcp://localhost:1883',
mqtts: 'ssl://localhost:8883',
mqttws: 'ws://localhost:1884',
mqtwss: 'wss://localhost:8884'
}, {
ssl: {
key: fs.readFileSync('./server.key'),
cert: fs.readFileSync('./server.crt')
},
emitEvents: true // default
}, function(client){
client.connack({
returnCode: 0
});
});
servers.listen(function(){
console.log('listening!');
});
```
For more detailed information about the server configuration check out [create-stream-server](https://github.com/mqttjs/create-stream-server).
## Contributing
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](https://github.com/mqttjs/mqtt-server/blob/master/CONTRIBUTING.md) file for more details.
### Contributors
mqtt-server is only possible due to the excellent work of the following contributors:
Joël GähwilerGitHub/256dpiTwitter/@256dpi
Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
Adam RuddGitHub/adamvrTwitter/@adam_vr
### License
MIT