You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,19 +103,24 @@ This project is tested on OSX & Linux, expected to work on Windows.
103
103
104
104
### Use in Node.js
105
105
106
-
To include this project programmatically:
106
+
To create an IPFS node programmatically:
107
107
108
108
```js
109
109
constIPFS=require('ipfs')
110
110
constnode=newIPFS()
111
+
112
+
node.on('ready', () => {
113
+
// Ready to use!
114
+
// See https://github.com/ipfs/js-ipfs#core-api
115
+
})
111
116
```
112
117
113
118
### Through command line tool
114
119
115
120
In order to use js-ipfs as a CLI, you must install it with the `global` flag. Run the following (even if you have ipfs installed locally):
116
121
117
122
```bash
118
-
>npm install ipfs --global
123
+
npm install ipfs --global
119
124
```
120
125
121
126
The CLI is available by using the command `jsipfs` in your terminal. This is aliased, instead of using `ipfs`, to make sure it does not conflict with the [Go implementation](https://github.com/ipfs/go-ipfs).
@@ -136,7 +141,19 @@ You can also load it using a `<script>` using the [unpkg](https://unpkg.com) CDN
0 commit comments