peer-cdn

peer-cdn

  • Docs
  • Help
  • GitHub

›Quick Start

Quick Start

  • Installation
  • Service Worker
  • Browser Client

Plugins

  • Peer Plugin
  • Network Plugin
  • Delegate Plugin

Router

  • Router
  • Middleware
  • Strategies

Server

  • Server

Example

  • Example

Getting Started

PeerCDN is a lightweight library providing peer to peer CDN functionality.

The main idea of peer-cdn is to use WebRTC with Service Worker to allow assets such as scripts, images, videos, styles and other files to be shared between peers reducing server usage.

Installation

npm
yarn
npm install peer-cdn
yarn add peer-cdn

Bundle size

┌───────────────────────────────────┐
│                                   │
│   Destination: dist/index.es.js   │
│   Bundle Size:  231.98 KB         │
│   Minified Size:  103.35 KB       │
│   Gzipped Size:  28.92 KB         │
│                                   │
└───────────────────────────────────┘
┌────────────────────────────────┐
│                                │
│   Destination: dist/index.js   │
│   Bundle Size:  247.79 KB      │
│   Minified Size:  95.14 KB     │
│   Gzipped Size:  27.77 KB      │
│                                │
└────────────────────────────────┘
Service Worker →
  • Installation
  • Bundle size
peer-cdn
Docs
Documentation
Community
Support
More
rafallorenz.comGitHubStar
Copyright © 2022 Rafał Lorenz