1.0.1 • Published 1 year ago
foodbot-dns-sd v1.0.1
foodbot-dns-sd
foodbot-dns-sd is a Node.js package that provides service registration and discovery functionality using mDNS (Multicast DNS) for different platforms.
Installation
npm install foodbot-dns-sd
Usage
const foodbotDnsSd = require('foodbot-dns-sd');
// Register a service
const service = {
name: 'my-foodbot-service',
type: 'foodbot',
port: 12345
};
foodbotDnsSd.registerService(service).then((service) => {
console.log('Service registered:', service);
});
// Discover services
foodbotDnsSd.discoverServices('windows','websocket','foodbot-POS').then(services => {
console.log('Discovered services:', services);
});