Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/libp2p/js-libp2p-examples

Examples for the JS implementation of libp2p
https://github.com/libp2p/js-libp2p-examples

Last synced: 20 days ago
JSON representation

Examples for the JS implementation of libp2p

Awesome Lists containing this project

README

        



libp2p hex logo

A collection of js-libp2p examples





Explore the docs
·
Report Bug
·
Request Feature/Example

## Table of Contents

- [About The Project](#about-the-project)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Understanding how libp2p works](#understanding-how-libp2p-works)
- [Other examples](#other-examples)
- [Contribute](#contribute)
- [License](#license)

## About The Project

- Read the [js-libp2p documentation](https://github.com/libp2p/js-libp2p/tree/main/doc)
- Check out the [js-libp2p API docs](https://libp2p.github.io/js-libp2p/)
- Check out the [general libp2p documentation](https://docs.libp2p.io) for tips, how-tos and more
- Read the [libp2p specs](https://github.com/libp2p/specs)
- See https://blog.libp2p.io for news and more
- Head over to https://proto.school to take interactive tutorials that cover core libp2p APIs
- Need help? Visit the discussion board: https://github.com/libp2p/js-libp2p/discussions

## Getting Started

Feel free to jump directly into the examples, however going through the following sections will help build context and background knowledge.

### Prerequisites

Make sure you have installed all of the following prerequisites on your development machine:

- Git - [Download & Install Git](https://git-scm.com/downloads). OSX and Linux machines typically have this already installed.
- Node.js - [Download & Install Node.js](https://nodejs.org/en/download/) and the npm package manager.

### Understanding how libp2p works

- [Circuit Relay](https://github.com/libp2p/js-libp2p-example-circuit-relay) - configuring Circuit Relay connections
- [Connection Encryption](https://github.com/libp2p/js-libp2p-example-connection-encryption) - how to encrypt connection between libp2p nodes
- [Delegated routing](https://github.com/libp2p/js-libp2p-example-delegated-routing) - how to offload network operations and queries onto more capable nodes
- [Discovery mechanisms](https://github.com/libp2p/js-libp2p-example-discovery-mechanisms) - how libp2p discovers other peers on the network
- [Custom protocols](https://github.com/libp2p/js-libp2p-example-custom-protocols) - how to create a custom protocol for your application
- [Transports](https://github.com/libp2p/js-libp2p-example-transports) - how to connect peers together via different transports
- [WebRTC](https://github.com/libp2p/js-libp2p-example-webrtc-private-to-private) - a special transport for connecting browsers together

### Other examples

These are demo apps or examples that showcase specific modules or services:

- [Chat](https://github.com/libp2p/js-libp2p-example-chat) - a simple chat app
- [Browser Pub/Sub](https://github.com/libp2p/js-libp2p-example-browser-pubsub) - Using Pub/Sub between browsers

There is also [universal connectivity](https://github.com/libp2p/universal-connectivity/tree/main) demo that shows of how many different libp2p implementations can be connected together.

## Contribute

See [CONTRIBUTING.md](https://github.com/libp2p/js-libp2p-examples/blob/main/CONTRIBUTING.md).

## License

Licensed under either of

- Apache 2.0, ([LICENSE-APACHE](https://github.com/libp2p/js-libp2p-examples/blob/main/LICENSE-APACHE) / )
- MIT ([LICENSE-MIT](https://github.com/libp2p/js-libp2p-examples/blob/main/LICENSE-MIT) / )