Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit f7bcd42

Browse files
committed
Update port description, add catch
1 parent 173d97a commit f7bcd42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ $ npm install --save ipfs-api
2020

2121
#### Running the daemon with the right port
2222

23-
To interact with the API, you need to have a local daemon running (at the moment; we have plans to make it work independently). It needs to be open on the right port: `5001`. This is the default.
23+
To interact with the API, you need to have a local daemon running (at the moment; we have plans to make it work independently). It needs to be open on the right port. `5001` is the default, and is used in the examples below, but it can be set to whatever you need.
2424

2525
```sh
2626
# Show the ipfs config API port to check it is correct
@@ -94,6 +94,9 @@ ipfs.id()
9494
.then(function (id) {
9595
console.log('my id is: ', id)
9696
})
97+
.catch(function(err) {
98+
console.log('Fail: ', err)
99+
})
97100
```
98101

99102
This relies on a global `Promise` object. If you are in an environment where that is not

0 commit comments

Comments
 (0)