Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bonjour

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bonjour

A Bonjour/Zeroconf implementation in pure JavaScript

  • 3.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.1M
increased by8.69%
Maintainers
1
Weekly downloads
 
Created

What is bonjour?

The bonjour npm package is a zero-configuration networking library that allows for network discovery and service advertisement. It implements the multicast DNS (mDNS) protocol, commonly used for discovering services on a local network without the need for manual setup or configuration.

What are bonjour's main functionalities?

Service Advertising

This feature allows you to advertise network services such as HTTP servers, FTP servers, and more. The code sample demonstrates how to advertise an HTTP server on port 3000 using bonjour.

const bonjour = require('bonjour')();

// advertise an HTTP server on port 3000
bonjour.publish({ name: 'My Web Server', type: 'http', port: 3000 });

// Unpublish all services
bonjour.unpublishAll();
bonjour.destroy();

Service Discovery

This feature enables the discovery of services advertised on the local network. The code sample shows how to find all advertised HTTP services using bonjour.

const bonjour = require('bonjour')();

// browse for all HTTP services
bonjour.find({ type: 'http' }, function (service) {
  console.log('Found an HTTP server:', service);
});

Other packages similar to bonjour

Keywords

FAQs

Package last updated on 07 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc