Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
myruldeen committed Apr 1, 2020
1 parent 08e1c61 commit df84ac6
Show file tree
Hide file tree
Showing 4 changed files with 1,068 additions and 58 deletions.
22 changes: 0 additions & 22 deletions aedes-logging.js

This file was deleted.

21 changes: 14 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
'use-strict';
'use strict';

const fs = require('fs');
const aedes = require('aedes')();
const port = 8883;
const instance = require('aedes')();
const logging = require('aedes-logging');

const options = {
key: fs.readFileSync('certs/key.pem'),
cert: fs.readFileSync('certs/certificate.pem')
};
const servers = [startTLS()];

const server = require('tls').createServer(options, aedes.handle);

server.listen(port, function() {
console.log('server started and listening on port ', port);
logging({
instance: instance,
servers: servers
});

function startTLS() {
return require('tls')
.createServer(options, instance.handle)
.listen(8883);
}
Loading

0 comments on commit df84ac6

Please sign in to comment.