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

radiovis-stomp-server

v0.2.0

Published

STOMP server implementation for RadioVis

Downloads

10

Readme

RadioVis STOMP Server

This is an implementation of a subset of the STOMP protocol in node.js, for purpose of deploying a RadioVis service.

RadioVis was standardised in ETSI TS 101 499, Hybrid Digital Radio (DAB, DRM, RadioDNS); SlideShow; User Application Specification.

Running

The recommended version of Node.js is v20

npm install
npm start

This will start a STOMP server running on port 61613.

Publishing images and text

Content is pushed to clients via a HTTP POST. The content can be sent using either URL encoding, or as JSON. Text and Image can be sent using separate requests or in the same request. A link may optionally be specified at the same time as an image.

For example to update the text for a station using curl:

curl -v http://localhost:3000/services/station1 -d 'text=Hello World'

Or to update the image and link:

curl http://localhost:3000/services/station2 \
  -d 'image=http://www.example.com/images/myimage.jpg' \
  -d 'link=http://www.example.com/programmes/breakfast'

Running Tests

npm test

To generate a test coverage report:

npm run coverage

Settings

The settings.js file is used to configure the server. It supports the following confection options:

| Setting Name | Default | Description | | -------------------- | --------------- | ----------------------- | | stompPort | 61613 | STOMP port to listen for client connections on. | | stompHost | 0.0.0.0 | IP address to bind STOMP connections to. | | adminPort | 3000 | HTTP port to listen for HTTP admin connections on. | | adminHost | 127.0.0.1 | IP address to bind HTTP admin interface to. | | servicesFile | services.json | JSON file to load list of broadcast services from. | | republishFrequency | 900 | How often to re-publish messages to subscribers. | | wildcard | false | Enable support for wildcard bearer in topics (*) |

Testing

BBC R&D have written a GUI python tool called RadioVisDemo which can be useful to test a RadioVis server:

https://github.com/bbc/RadioVisDemo

Or to test using the command-line, you could use the stomp.py tool to subscribe to messages:

stomp -H 127.0.0.1 -P 61613 -S 1.0 -L '/topic/fm/ce2/c201/09710/text'

Here is is another example subscribing to all services using a wildcard topic:

stomp -H 127.0.0.1 -P 61613 -S 1.0 -L '/topic/*/text' --verbose

License

Copyright 2017-2024 British Broadcasting Corporation

The RadioVis STOMP Server is free software; you can redistribute it and/or modify it under the terms of the Apache License, Version 2.0.

The RadioVis STOMP Server is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache License, Version 2.0 for more details.

The favicon.ico image was created from the Mozilla radio SVG:

https://github.com/mozilla/fxemoji/blob/gh-pages/svgs/objects/u1F4FB-radio.svg

Which is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0):

https://creativecommons.org/licenses/by/4.0/