Skip to content

Commit e4a694b

Browse files
daviddiasdryajov
authored andcommitted
WIP - feat: convergence (#94)
* feat: convergence * structure examples
1 parent ebb0d90 commit e4a694b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2267
-91
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ libp2p is the product of a long and arduous quest to understand the evolution of
2828

2929
We are in the process of writting better documentation, blog posts, tutorials and a formal specification. Today you can find:
3030

31-
- [libp2p.io - The libp2p Website (WIP)](https://github.com/libp2p/website)
31+
- [libp2p.io](https://libp2p.io)
3232
- [Specification (WIP)](https://github.com/libp2p/specs)
3333
- Talks
3434
- [`libp2p <3 ethereum` at DEVCON2](https://ethereumfoundation.org/devcon/?session=libp2p) [video](https://www.youtube.com/watch?v=HxueJbeMVG4) [slides](https://ethereumfoundation.org/devcon/wp-content/uploads/2016/10/libp2p-HEART-devp2p-IPFS-PLUS-Ethereum-networking.pdf) [demo-1](https://ethereumfoundation.org/devcon/wp-content/uploads/2016/10/libp2p_demo1-1.mp4) [demo-2](https://ethereumfoundation.org/devcon/wp-content/uploads/2016/10/libp2p_demo2-1.mp4)
@@ -41,8 +41,8 @@ To sum up, libp2p is a "network stack" -- a protocol suite -- that cleanly separ
4141

4242
With its modular nature, libp2p can be found being used in different projects with different sets of features, while preserving the same top level API. `js-libp2p` is only a skeleton and should not be installed directly, if you are looking for a prebundled libp2p stack, please check:
4343

44-
- [libp2p-ipfs-nodejs](https://github.com/ipfs/js-libp2p-ipfs-nodejs) - The libp2p build used by js-ipfs when run in Node.js
45-
- [libp2p-ipfs-browser](https://github.com/ipfs/js-libp2p-ipfs-browser) - The libp2p build used by js-ipfs when run in a Browser (that supports WebRTC)
44+
- [libp2p-ipfs-nodejs](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/libp2p-nodejs.js) - The libp2p build used by js-ipfs when run in Node.js
45+
- [libp2p-ipfs-browser](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/libp2p-browser.js) - The libp2p build used by js-ipfs when run in a Browser (that supports WebRTC)
4646

4747
If you have developed a libp2p bundle, please consider submitting it to this list so that it can be found easily by the users of libp2p.
4848

examples/README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
### Examples list
1+
# `js-libp2p` Examples and Tutorials
22

3-
Here are some examples built with libp2p bundles.
3+
In this folder, you can find a variety of examples to help you get started in using js-libp2p, in Node.js and in the Browser. Every example as a specific purpose and some of each incorporate a full tutorial that you can follow through, helping you expand your knowledge about libp2p and p2p networks in general.
44

5-
- https://github.com/ipfs/js-libp2p-ipfs/tree/master/examples/echo
6-
- https://github.com/ipfs/js-libp2p-ipfs/tree/master/examples/chat
5+
Let us know if you find any issue or if you want to contribute and add a new tutorial, feel welcome to submit a PR, thank you!
6+
7+
## Examples
8+
9+
- [In Node.js](./nodejs)
10+
- [echo](./nodejs/echo)
11+
- [chat](./nodejs/chat)
12+
- [In the browser](./browser)
13+
- [mapper](./browser/mapper)

examples/archived/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/archived/node-1.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

examples/archived/node-2.js

Lines changed: 0 additions & 31 deletions
This file was deleted.

examples/browser-chat/.gitkeep

Whitespace-only changes.

examples/browser-echo/README.md

Whitespace-only changes.

examples/browser/mapper/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bundle.js

examples/browser/mapper/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "mapper",
3+
"version": "0.0.0",
4+
"description": "",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"bundle": "browserify src/index.js --require browserify-zlib-next:zlib > public/bundle.js",
8+
"serve": "static public -p 9090 -H '{\"Cache-Control\": \"no-cache, must-revalidate\"}'",
9+
"mon": "nodemon --exec \"npm run start\" --ignore public/bundle.js",
10+
"start": "npm run bundle && npm run serve"
11+
},
12+
"license": "MIT",
13+
"devDependencies": {
14+
"browserify": "^14.0.0",
15+
"browserify-optional": "^1.0.0",
16+
"browserify-zlib-next": "^1.0.1",
17+
"concat-stream": "^1.6.0",
18+
"detect-dom-ready": "^1.0.2",
19+
"node-static": "^0.7.9",
20+
"nodemon": "^1.11.0"
21+
},
22+
"dependencies": {}
23+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8"/>
5+
<title>p2p mapper</title>
6+
</head>
7+
<body>
8+
<h1>p2p mapper</h1>
9+
<div id="my-peer"></div>
10+
<div id="swarm"></div>
11+
12+
<script src="bundle.js"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)