diff --git a/README.md b/README.md index c897ae0e2..40759d666 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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