From 397e98484d3044b6010472e3bc4f7f0a9154ed24 Mon Sep 17 00:00:00 2001 From: Fawaz Ahmed Date: Sun, 11 Feb 2024 01:06:27 +0530 Subject: [PATCH] Fix broken example --- content/guides/getting-started/javascript.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/guides/getting-started/javascript.md b/content/guides/getting-started/javascript.md index 93586987..2536e892 100644 --- a/content/guides/getting-started/javascript.md +++ b/content/guides/getting-started/javascript.md @@ -187,7 +187,7 @@ We can configure and use [`pingService`](https://libp2p.github.io/js-libp2p/modu We can have our application accepting a peer multiaddress via command line argument and try to ping it. To do so, we'll need to add a couple things. First, require the `process` module so that we can get the command line arguments. Then we'll need to parse the multiaddress from the command line and try to ping it: ```sh -npm install multiaddr +npm install multiaddr @libp2p/ping ``` ```javascript @@ -197,7 +197,7 @@ import { tcp } from '@libp2p/tcp' import { noise } from '@chainsafe/libp2p-noise' import { mplex } from '@libp2p/mplex' import { multiaddr } from 'multiaddr' -import { pingService } from 'libp2p/ping' +import { ping } from '@libp2p/ping' const node = await createLibp2p({ addresses: { @@ -208,7 +208,7 @@ const node = await createLibp2p({ connectionEncryption: [noise()], streamMuxers: [mplex()], services: { - ping: pingService({ + ping: ping({ protocolPrefix: 'ipfs', // default }), },