Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Dec 30, 2015
1 parent 41b11d9 commit fcb7962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# bonjour

A Bonjour/Zeroconf protocol implementation in JavaScript.
A Bonjour/Zeroconf protocol implementation in pure JavaScript. Publish
services on the local network or discover existing services using
multicast DNS.

[![Build status](https://travis-ci.org/watson/bonjour.svg?branch=master)](https://travis-ci.org/watson/bonjour)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
Expand All @@ -13,18 +15,13 @@ npm install bonjour

## Usage

Advertise a new service:

```js
var bonjour = require('bonjour')()

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

Discover services:

```js
// browse for all http services
bonjour.find({ type: 'http' }, function (service) {
console.log('Found an HTTP server:', service)
})
Expand All @@ -44,8 +41,6 @@ documentation](https://github.com/mafintosh/multicast-dns#mdns--multicastdnsopti

### Publishing

Allow the user to publish a new service on the network.

#### `var service = bonjour.publish(options)`

Publishes a new service.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bonjour",
"version": "3.0.0",
"description": "A Bonjour/Zeroconf protocol implementation in JavaScript",
"description": "A Bonjour/Zeroconf implementation in pure JavaScript",
"main": "index.js",
"dependencies": {
"mdns-txt": "^2.0.0",
Expand Down

0 comments on commit fcb7962

Please sign in to comment.