Skip to content

Commit

Permalink
structure examples
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jul 3, 2017
1 parent e3bf193 commit 11e0449
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 10 deletions.
15 changes: 11 additions & 4 deletions examples/README.md
@@ -1,6 +1,13 @@
### Examples list
# `js-libp2p` Examples and Tutorials

Here are some examples built with libp2p bundles.
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.

- https://github.com/ipfs/js-libp2p-ipfs/tree/master/examples/echo
- https://github.com/ipfs/js-libp2p-ipfs/tree/master/examples/chat
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!

## Examples

- [In Node.js](./nodejs)
- [echo](./nodejs/echo)
- [chat](./nodejs/chat)
- [In the browser](./browser)
- [mapper](./browser/mapper)
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,7 +1,7 @@
'use strict'

const PeerInfo = require('peer-info')
const Node = require('../../../src')
const Node = require('../../../../test/browser-bundle/browser-bundle.js')

function createNode (callback) {
PeerInfo.create((err, peerInfo) => {
Expand Down
File renamed without changes.
Expand Up @@ -3,10 +3,9 @@

const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const Node = require('../../src')
const Node = require('../../../../test/nodejs-bundle/nodejs-bundle.js')
const multiaddr = require('multiaddr')
const pull = require('pull-stream')
// const toPull = require('stream-to-pull-stream')
const async = require('async')
const Pushable = require('pull-pushable')
const p = Pushable()
Expand Down
Expand Up @@ -3,7 +3,7 @@

const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const Node = require('../../src')
const Node = require('../../../../test/nodejs-bundle/nodejs-bundle.js')
const multiaddr = require('multiaddr')
const pull = require('pull-stream')
const Pushable = require('pull-pushable')
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -7,7 +7,7 @@

const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const Node = require('../../src')
const Node = require('../../../../test/nodejs-bundle/nodejs-bundle.js')
const multiaddr = require('multiaddr')
const pull = require('pull-stream')
const async = require('async')
Expand Down
File renamed without changes.
File renamed without changes.
Expand Up @@ -7,7 +7,7 @@

const PeerId = require('peer-id')
const PeerInfo = require('peer-info')
const Node = require('../../src')
const Node = require('../../../../test/nodejs-bundle/nodejs-bundle.js')
const multiaddr = require('multiaddr')
const pull = require('pull-stream')
const series = require('async/series')
Expand Down

0 comments on commit 11e0449

Please sign in to comment.