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

Commit

Permalink
Update port description, add catch
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLitt committed May 11, 2016
1 parent 173d97a commit f7bcd42
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $ npm install --save ipfs-api

#### Running the daemon with the right port

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.
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.

```sh
# Show the ipfs config API port to check it is correct
Expand Down Expand Up @@ -94,6 +94,9 @@ ipfs.id()
.then(function (id) {
console.log('my id is: ', id)
})
.catch(function(err) {
console.log('Fail: ', err)
})
```

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

0 comments on commit f7bcd42

Please sign in to comment.