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

u-wave-core

v0.5.0-alpha.19

Published

The üWave core library.

Downloads

61

Readme

u-wave-core

Website - Server List - Discord

The backend server for üWave, the collaborative listening platform.

Dependencies - Development - API - License

Dependencies

üWave consists of two parts: the server (this repository) and the web client. The server on its own only provides an HTTP API, so you must also run the web client to actually use it.

üWave requires MongoDB and Redis databases.

Usage

üWave comes with an executable file that includes YouTube and SoundCloud support by default. The server can be configured with environment variables. You must provide a YOUTUBE_API_KEY to use YouTube. SoundCloud works without API keys.

If you need more configuration options, your only option is to use the Node.js API of this package, and write your own server entry point. Over time more options will be made available through the CLI.

npx u-wave-core

Environment Variables:

  • SECRET - A secret key used for encrypting passwords. Must be a 64-character hexadecimal string (= 256 bits).
  • PORT - Port to listen on. Defaults to 6042.
  • REDIS_URL - URL of the Redis instance to connect to. Defaults to redis://localhost:6379/.
  • MONGODB_URL - URL of the MongoDB database to use. Defaults to mongodb://localhost:27017/uwave.
  • YOUTUBE_API_KEY (optional) - Your YouTube Data API key.

Development

The server can be run in development mode by:

git clone https://github.com/u-wave/core u-wave-core
cd u-wave-core
npm install
npm start

The development server reads configuration from a .env file in the root of the repository.

# Database connection URLs.
REDIS_URL=redis://localhost:6379/
MONGODB_URL=mongodb://localhost:27017/uwave_dev

# Enables the YouTube media source if given.
YOUTUBE_API_KEY=your key

API

You only need to use the API if you are integrating the üWave library with your own app.

API documentation is very incomplete and might change a lot before 1.0.0. Take care!

See the example/ directory for a usage example.

uw = uwave(options={})

Create and start a üWave server.

Parameters

  • mongo - A MongoDB connection URL.
  • redis - A Redis connection URL.

uw.source(sourcePlugin, options={})

Add a media source plugin. Source plugins can be used to search and import media from remote sources like YouTube or SoundCloud. Existing source plugins can be found on npm with the u-wave-source keyword.

Parameters

  • sourcePlugin - Source plugin or plugin factory. Receives two parameters: The uw üWave Core instance, and the plugin options.
  • options - Options to pass to the source plugin.

uw.close(): Promise

Stops the üWave server.

License

MIT