Code Monkey home page Code Monkey logo

stream's Introduction

stream2own

Play fair.


Resonate is an open-source music streaming service run by a cooperative of artists and software developers. If you want to know what we're building, or want to get involved head over to the Platform category on our forum.

Table of Contents

Getting Started

Quickstart

Quick-n-dirty instructions to get the player up and running on your computer using http and pointing to the existing production API (see API to learn more about the API). Assumes the latest version of node.js.

Stuck or curious about the roadmap? Ask for help in the forum.

Clone the repo and cd into it:

[email protected]:resonatecoop/stream.git
cd stream

Install lerna. Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm.

npm i lerna -g

Install dependencies:

lerna bootstrap

Create your env file:

cp beta/.env.example beta/.env

Run the app:

npm run dev

You should see the app running at http://localhost:8080.

Try logging in at http://localhost:8080/login.

You can run the app at a different port using the command below:

npm run dev -- --port 8089

The embed app (optional)

lerna run --scope embed start --parallel

Testing on Mobile: Using HTTPS

HTTPS is required to test PWAs on mobile. Read more about Progressive Web Apps.

Nginx

You can find a reference nginx configuration file in the docs. Note that the reference is not a complete nginx.conf file, it should fit within your existing configuration or be wrapped in a http block directive:

http {
  server {
  }
}

In the example nginx.conf, note the lines referring to the ssl_certificate_key and the ssl_certificate_key.

Generating a Custom Certificate

You can generate a custom certificate using mkcert for beta.resonate.localhost. This origin is whitelisted in our CORS config.

Generate the certificate (cert.pem) and key (key.pem) for beta.resonate.localhost:

mkcert -key-file key.pem -cert-file cert.pem beta.resonate.localhost

In your nginx.conf file, update the ssl_certificate_key and the ssl_certificate_key to refer to your new key and certificate files.

Update your Hosts file

Update your hosts file to include:

127.0.0.1       beta.resonate.localhost

Update on your .env file

APP_DOMAIN=beta.resonate.localhost
APP_HOST=https://beta.resonate.localhost

Run the app!

npm run dev

You should now see the player running on https://beta.resonate.localhost or

Development

API

If you want to build on the API for personal use, consider checking the backlog in our community forum. The Tracks API repo is currently private, but you may ask for access in the forum.

The Swagger API documentation is currently in flux and split across the Resonate Search API (see the top right corner for the different services) and Resonate Service Documentation: User.

Other Commands

Add a package

lerna add @resonate/button --scope "beta"

Add a dev dependency

Here's how you would add gulp to tools

lerna add gulp --scope tools

Build

npm run build

To compile a specific package

lerna run build --scope "@resonate/rangeslider"

Testing

Run all tests (standard, dependency-check)

npm test

Test a specific component

lerna run test --scope "@resonate/player-component"

A package can have browser tests (tape-run)

lerna run test:browser --scope "@resonate/api-factory-generator"

Commands

Commands may be run with $ lerna run.

Example: $ lerna run --scope beta start --parallel.

Command Description
$ npm run dev Start beta app development server
$ npm test Lint, validate deps & run dependency-check for all packages
$ npm run build Compile all beta app files into beta/dist/

Code style

We use standard as a linter and javascript style guide. Make sure to add appropriate plugin for your editor (see: standard#are-there-text-editor-plugins) or install a pre-commit hook (see .pre-commit-config.yaml) to automatically apply the standard style.

Maintainers

See Also

  • choo - sturdy 4kb frontend framework
  • nanohtml - HTML template strings for the Browser with support for Server Side Rendering in Node. strings
  • nanocomponent - create performant HTML components
  • tachyons - functional CSS for humans
  • sheetify - modular CSS bundler for browserify

stream's People

Contributors

auggod avatar whatsocks avatar mcfiredrill avatar angusmcleod avatar cillian avatar fang- avatar jake-gillberg avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.