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

Commit 17e3ee8

Browse files
committed
update readme with opts info
1 parent c19c3f5 commit 17e3ee8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ $ npm install --save ipfs-api
2222
var ipfsAPI = require('ipfs-api')
2323

2424
// connect to ipfs daemon API server
25-
var ipfs = ipfsAPI('localhost', '5001') // leaving out the arguments will default to these values
25+
var ipfs = ipfsAPI('localhost', '5001', {protocol: 'http'}) // leaving out the arguments will default to these values
26+
27+
// or connect with multiaddr
28+
var ipfs = ipfsAPI('/ip4/127.0.0.1/tcp/5001')
29+
30+
// or using options
31+
var ipfs = ipfsAPI({host: 'localhost', port: '5001', procotol: 'http'})
32+
2633
```
2734

2835
### In the Browser through browserify

0 commit comments

Comments
 (0)