Skip to content

Commit

Permalink
[#140] - first pass at autodiscovery
Browse files Browse the repository at this point in the history
  • Loading branch information
timkim committed Feb 9, 2016
1 parent e3a30a9 commit 918c479
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/serve.js
Expand Up @@ -6,6 +6,7 @@ var events = require('events'),
http = require('http'),
localtunnel = require('localtunnel'),
middleware = require('./middleware'),
mdns = require('mdns'),
ip = require('./util/ip'),
socketServer = require('./util/socket-server'),
emitter = new events.EventEmitter(),
Expand Down Expand Up @@ -80,6 +81,9 @@ module.exports = function(options) {

// bind complete
server.on('listening', function() {
var ad = mdns.createAdvertisement(mdns.tcp('http'), options.port);
ad.start();

var data = {
address: 'unknown',
addresses: ['unknown'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -32,6 +32,7 @@
"ip": "0.3.1",
"localtunnel": "1.3.0",
"node-static": "0.7.0",
"mdns" : "2.3.0",
"request": "2.33.0",
"request-progress": "0.3.1",
"shelljs": "0.2.6",
Expand Down

0 comments on commit 918c479

Please sign in to comment.