Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lorenz/nanodiscover
A minimal local network discovery module
https://github.com/lorenz/nanodiscover
Last synced: 1 day ago
JSON representation
A minimal local network discovery module
- Host: GitHub
- URL: https://github.com/lorenz/nanodiscover
- Owner: lorenz
- License: mit
- Created: 2014-11-11T20:48:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-11T21:17:44.000Z (about 10 years ago)
- Last Synced: 2024-08-10T09:13:28.605Z (5 months ago)
- Language: CoffeeScript
- Size: 156 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NanoDiscover
*A minimal local network discovery module*## Installation
npm install --save nanodiscover## Usage
Create an announcer:discover = require("nanodiscover")
discover.createAnnouncer("myprogram","1.0.0") // Version is optionalCreate a browser:
discover = require("nanodiscover")
browser = discover.createBrowser("myprogram","1.0.0")
browser.on("nodeUp",function (ip) {
console.log("Found Node with IP ", ip);
});
browser.on("nodeDown",function (ip) {
console.log("Lost node with IP ", ip);
});setTimeout(function () {
console.log("We know the following nodes: ",browser.nodes);
},1000);## License
See LICENSE file