npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

airplay-server

v1.1.0

Published

An AirPlay server

Downloads

10

Readme

airplay-server

An extendable and thin AirPlay server.

This module is a thin AirPlay server that you can use to easily implement your own AirPlay functionality. By it self it doesn't do anything else than expose it self on the network as an AirPlay server. All requests to the server is sent to listeners that you attach to the airplay server by listening for the "request" event.

You can see a very simpel implemenation example under examples/server.js.

I'm currently working on a more full fleshed and usable AirPlay server implementation in the AirServer project, but it's currently a work in progress.

Please note that some AirPlay clients expects a RAOP server (AirTunes) to be running on the network with the same name as the AirPlay server. In case you need a RAOP server, please consider the raop-server project.

Build status js-standard-style

Installation

npm install airplay-server

Example usage

var airplay = require('airplay-server')('My AirPlay Server')

airplay.on('request', function (req, res) {
  // do your stuff
})

airplay.listen(5000) // start server on port 5000

API

Constructor

Get the constructor by requireing the airplay-server node module and call it. It takes the optional arguments name, options and onRequest. Either of them can be left out, so calling with only options or only name and onRequest is ok:

require('airplay-server')(name, options, onRequest)

Constructor arguments:

  • name - name of the AirPlay server (default: 'Node.js')
  • options - options object (default: {})
  • onRequest - callback function called upon each request (default: No listener is added. Remember to manually listen on the request event)

Options:

  • features - A features bit-mask (default: all features)
  • txt - object used to replace stock TXT record

Server

The constructor returns a basic Node.js HTTP server, so remember to call .listen() and optionally add a request event listener if one hasn't been provided as an argument to the constructor.

License

MIT