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 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 │
│ │
└────────────────────────────────┘