Skip to content

Commit e2b703b

Browse files
committed
add to sections + edits
1 parent 2b53c7a commit e2b703b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

docs/images/jsipfs-webui.png

189 KB
Loading

docs/reference/js/api.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,22 @@ Web UI available at http://127.0.0.1:5002/webui
149149
Daemon is ready
150150
```
151151

152+
You should be able to point to the [webpage](http://127.0.0.1:5002/webui):
153+
154+
<img src="../../images/jsipfs-webui.png" width="1000">
155+
156+
If you are unable to connect to the API, ensure [cross-origin (CORS)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) requests are configured:
157+
158+
```bash
159+
jsipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:5002", "http://localhost:3000", "http://127.0.0.1:5001", "https://webui.ipfs.io"]'
160+
jsipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
161+
```
162+
152163
:::
153164

154165
::: tab ipfs-core
155166

156-
Create a simple Node.js application to host the logic that will allow you to use the RPC API.
167+
Create a simple Node.js application to host the logic that will allow you to use the RPC API. You'll also use this Node.js application later on to add and remove files.
157168

158169
Start by initiating a new project:
159170

@@ -221,7 +232,7 @@ Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/p2p/12D3KooWMZr34r6FArFH36QxyT25BM
221232

222233
::: tab ipfs-http-client
223234

224-
Create a simple Node.js application to host the logic that will connect to the API client.
235+
Create a simple Node.js application to host the logic that will connect to the API client. You'll use this Node.js application later on to add and remove files.
225236

226237
Start by initiating a new project:
227238

0 commit comments

Comments
 (0)