Created
February 23, 2016 20:02
-
-
Save justindarc/4a4ec9bf14327f944c1a to your computer and use it in GitHub Desktop.
node-mdns-http-test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var mdns = require('mdns'); | |
const HTTP_PORT = 8000; | |
var server = http.createServer(function(request, response) { | |
response.end('Hello world!'); | |
}); | |
server.listen(HTTP_PORT); | |
var ad = mdns.createAdvertisement(mdns.tcp('http'), HTTP_PORT); | |
ad.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "node-mdns-http-test", | |
"version": "1.0.0", | |
"main": "index.js", | |
"dependencies": { | |
"mdns": "^2.3.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment