We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i've installed it but i cannot get any logs.
var wsPort = 1883; var wsSslPort = 1885; var fs = require('fs'); var aedes = require('aedes')(); var logging = require('aedes-logging'); var ws = require('websocket-stream'); // WsSsl server var wsSslServer = require('https').createServer({ key: fs.readFileSync("./scao.key"), cert: fs.readFileSync("./scao.crt"), requestCert: false // client send their certificate //rejectUnauthorized: true, //ca: [ fs.readFileSync("./scao.crt") ] }); ws.createServer({ server: wsSslServer }, aedes.handle); wsSslServer.listen(wsSslPort, "0.0.0.0", function () { console.log('MQTT websocket tls server listening on port', wsSslPort) }); // Ws server var wsServer = require('http').createServer(); ws.createServer({ server: wsServer }, aedes.handle); wsServer.listen(wsPort, "0.0.0.0", function () { console.log('MQTT websocket server listening on port', wsPort) }); var servers = [ wsServer, wsSslServer ]; var instance = aedes; logging({ instance: instance, servers: servers }) */ 'use strict' var fs = require('fs') var path = require('path') var http = require('http') var https = require('https') var websocket = require('websocket-stream') var net = require('net') var tls = require('tls') var aedes = require('aedes') var logging = require('aedes-logging') var instance = aedes() var servers = [ startHttp(), startHttps(), startNet(), startTLS() ] logging({ instance: instance, servers: servers }) function startHttp () { var server = http.createServer() websocket.createServer({ server: server }, instance.handle) server.listen(8880) return server } function startHttps () { var server = https.createServer({ key: fs.readFileSync(path.join(__dirname, 'cert', 'scao.key')), cert: fs.readFileSync(path.join(__dirname, 'cert', 'scao.crt')) }) websocket.createServer({ server: server }, instance.handle) server.listen(8881) return server } function startNet () { return net.createServer(instance.handle).listen(8882) } function startTLS () { return tls.createServer({ key: fs.readFileSync(path.join(__dirname, 'cert', 'scao.key')), cert: fs.readFileSync(path.join(__dirname, 'cert', 'scao.crt')) }, instance.handle).listen(8883) }
The text was updated successfully, but these errors were encountered:
This module likely needs some work, would you like to send a PR?
Sorry, something went wrong.
No branches or pull requests
i've installed it but i cannot get any logs.
The text was updated successfully, but these errors were encountered: