https://github.com/mqttjs/create-stream-server
create multiple stream servers easily
https://github.com/mqttjs/create-stream-server
Last synced: 7 months ago
JSON representation
create multiple stream servers easily
- Host: GitHub
- URL: https://github.com/mqttjs/create-stream-server
- Owner: mqttjs
- License: other
- Created: 2015-01-22T14:29:32.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-10-29T20:12:50.000Z (about 6 years ago)
- Last Synced: 2025-05-10T18:17:17.252Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 11.7 KB
- Stars: 19
- Watchers: 10
- Forks: 6
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# create-stream-server [](https://travis-ci.org/mqttjs/create-stream-server) [](http://badge.fury.io/js/create-stream-server)
**create multiple stream servers easily**
## Example
```js
var css = require('create-stream-server');
var servers = css({
s1: 'tcp://localhost:8080',
s2: 'ssl://0.0.0.0:80',
s3: {
protocol: 'wss',
host: 'localhost',
port: 8888,
ssl: {
key: fs.readFileSync('./wss_server.key'),
cert: fs.readFileSync('./wss_server.crt')
}
},
s4: {
attach: existingHttpServer
}
}, {
ssl: {
key: fs.readFileSync('./server.key'),
cert: fs.readFileSync('./server.crt')
}
}, function(clientStream, server){
// handle the connected client as a stream
});
// to start
servers.listen(function(){
console.log('launched!');
});
// after some time
servers.close(function(){
console.log('done!');
});
// to release all resources
servers.destroy(function(){
console.log('all gone!');
});
```
## Contributing
create-stream-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/create-stream-server/blob/master/CONTRIBUTING.md) file for more details.
### Contributors
create-stream-server is only possible due to the excellent work of the following contributors:
Joël GähwilerGitHub/256dpiTwitter/@256dpi
Matteo CollinaGitHub/mcollinaTwitter/@matteocollina
### License
MIT