Skip to content
This repository was archived by the owner on Nov 27, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@ typings/

# next.js build output
.next

# ignore certificates
*.crt
*.key
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In local mode, OrbitDB HTTP Client will launch its own IPFS node to replicate
the OrbitDB peer:

```shell
node src/cli.js local --orbitdb-dir /path/to/orbitdb
node src/cli.js local --orbitdb-dir /path/to/orbitdb --https-cert ./my.crt --https-key my.key
```

where --orbitdb-dir is the path to your OrbitDB peer.
Expand All @@ -58,12 +58,25 @@ In api mode, OrbitDB HTTP Client will connect to an existing IPFS node to
replicate the OrbitDB peer:

```shell
node src/cli.js api --ipfs-host localhost --orbitdb-dir /path/to/orbitdb
node src/cli.js api --ipfs-host localhost --orbitdb-dir /path/to/orbitdb --https-cert ./my.crt --https-key my.key
```

where --ipfs-host is an external IPFS node and --orbitdb-dir is the path to
your OrbitDB peer.

In both modes, you will also need to specify an SSL certifcate and private key:

--https-cert will be the path to your certificate.
--https-key will be the path to your associated private key.

You can generate an SSL certificate using an SSL certificate authority such as
Let's Encrypt. Alternatively, you can create your own self-signed certificate
although this is highly discouraged for production environments.

When using a self-signed SSL certificate you will either need to add your
certificate to your CA list or pass the ```-k``` option to curl, telling curl to
ignore the the insecure connection.

## API

### GET /dbs
Expand Down