diff --git a/lib/serve.js b/lib/serve.js index 4215b8d..e07cf8c 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -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(), @@ -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'], diff --git a/package.json b/package.json index 6492fc2..7ced0d5 100644 --- a/package.json +++ b/package.json @@ -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",