Skip to content

Commit 40b6d6f

Browse files
chore: fixed broken links on js-libp2p getting started tutorial (#86)
1 parent c3452ec commit 40b6d6f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/tutorials/getting-started/javascript.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Side note: throughout this tutorial, we use the `> ` character to indicate your
4444

4545
libp2p is a very modular framework, which allows javascript devs to target different runtime environments and opt-in to various features by including a custom selection of modules.
4646

47-
Because every application is different, we recommend configuring your libp2p node with just the modules you need. You can even make more than one configuration, if you want to target multiple javascript runtimes with different features. For example, the IPFS project has two libp2p configurations, [one for node.js](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/libp2p-nodejs.js) and [one for the browser](https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime/libp2p-browser.js).
47+
Because every application is different, we recommend configuring your libp2p node with just the modules you need. You can even make more than one configuration, if you want to target multiple javascript runtimes with different features. For example, the IPFS project has two libp2p configurations, [one for node.js](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-core/src/runtime/libp2p-nodejs.js) and [one for the browser](https://github.com/ipfs/js-ipfs/blob/master/packages/ipfs-core/src/runtime/libp2p-browser.js).
4848

4949
{{% notice note %}}
5050
In a production application, it may make sense to create a separate npm module for your libp2p node, which will give you one place to manage the libp2p dependencies for all your javascript projects. In that case, you should not depend on `libp2p` directly in your application. Instead you'd depend on your libp2p configuration module, which would in turn depend on `libp2p` and whatever modules (transports, etc) you might need.
@@ -139,7 +139,7 @@ const node = await Libp2p.create({
139139

140140
Now that you have configured a **Transport**, **Crypto** and **Stream Multiplexer** module, you can start your libp2p node. We can start and stop libp2p using the [`libp2p.start()`](https://github.com/libp2p/js-libp2p/blob/master/doc/API.md#start) and [`libp2p.stop()`](https://github.com/libp2p/js-libp2p/blob/master/doc/API.md#stop) methods.
141141

142-
A libp2p node needs to have a listen address for the given transport, so that it can be reached by other nodes in the network. Accordingly, we will install the `multiaddr` module to create a tcp [multiaddress](definition_muiltiaddress) and add it to the node.
142+
A libp2p node needs to have a listen address for the given transport, so that it can be reached by other nodes in the network. Accordingly, we will install the `multiaddr` module to create a tcp [multiaddress][definition_multiaddress] and add it to the node.
143143

144144
```js
145145
const Libp2p = require('libp2p')
@@ -266,7 +266,7 @@ listening on addresses:
266266
/ip4/127.0.0.1/tcp/50777/p2p/QmYZirEPREz9vSRFznxhQbWNya2LXPz5VCahRCT7caTLGm
267267
pinging remote peer at /ip4/127.0.0.1/tcp/50775/p2p/QmcafwJSsCsnjMo2fyf1doMjin8nrMawfwZiPftBDpahzN
268268
pinged /ip4/127.0.0.1/tcp/50775/p2p/QmcafwJSsCsnjMo2fyf1doMjin8nrMawfwZiPftBDpahzN in 3ms
269-
^Clibp2p has stopped
269+
libp2p has stopped
270270
```
271271

272272
Success! Our two peers are now communicating over a multiplexed, secure channel. Sure, they can only say "ping", but it's a start!
@@ -277,6 +277,6 @@ After finishing this tutorial, you should have a look into the [js-libp2p gettin
277277

278278
You also have a panoply of examples on [js-libp2p repo](https://github.com/libp2p/js-libp2p/tree/master/examples) that you can leverage to learn how to use `js-libp2p` for several different use cases and runtimes.
279279

280-
[definition_muiltiaddress]: /reference/glossary/#multiaddr
280+
[definition_multiaddress]: /reference/glossary/#multiaddr
281281
[definition_multiplexer]: /reference/glossary/#multiplexer
282282
[definition_peerid]: /reference/glossary/#peerid

0 commit comments

Comments
 (0)