-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
af6a023
commit cea876b
Showing
7 changed files
with
112 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,55 @@ | ||
# dat-pin | ||
An extension for the Dat CLI to support Pinning Services | ||
# dat-store | ||
An extension for the Dat CLI to support storage providers | ||
|
||
```shell | ||
npm install -g dat-pin | ||
npm install -g dat-store | ||
|
||
# Run a pinning service on http://localhost:3282 | ||
# Run a store on http://localhost:3282 | ||
dat-pin run-service | ||
|
||
# Add a dat to the pinning service so it's always being shared | ||
dat-pin add dat://0a9e202b8055721bd2bc93b3c9bbc03efdbda9cfee91f01a123fdeaadeba303e/ | ||
# Add a dat to the so it's always being shared | ||
dat-store dat://0a9e202b8055721bd2bc93b3c9bbc03efdbda9cfee91f01a123fdeaadeba303e/ | ||
|
||
# Install local pinning service | ||
dat-pin install-service | ||
# Install local | ||
dat-store install-service | ||
|
||
# Configure external pinning service | ||
dat-pin set-service https://hashbase.io/ | ||
dat-pin login -u yourusername -p yourpassword | ||
# Configure external storage provider | ||
dat-store set-provider https://hashbase.io/ | ||
dat-store login yourusername | ||
``` | ||
|
||
## Commands | ||
|
||
``` | ||
dat-store <url> | ||
Add a Dat to your storage provider. | ||
Commands: | ||
dat-pin add Pin a `dat://` read key to your pinning service to | ||
keep it online | ||
dat-pin remove Remove a `dat://` read key from your pinning | ||
service | ||
dat-pin list List the `dat://` read keys that you've pinned | ||
dat-pin set-service Set the URL of the pinning service you want to use | ||
dat-pin unset-service Resets your preferences to use your local pinning | ||
service | ||
dat-pin get-service Get the URL for your pinning service | ||
dat-pin login Logs you into the configured pinning service. Not | ||
necessary for local services | ||
dat-pin logout Logs you out of the pinning service | ||
dat-pin run-service Runs the pinning service without installing it in | ||
the background. | ||
dat-pin install-service Installs a local pinning service on your computer. | ||
This will run in the background while your computer | ||
is active. | ||
dat-pin uninstall-service Uninstalls your local pinning service. | ||
dat-store add <url> Add a Dat to your storage provider. | ||
[default] | ||
dat-store remove <url> Remove a Dat from your storage | ||
provider. | ||
dat-store list List the Dats in your storage provider. | ||
dat-store set-provider <url> Set the URL of your storage provider. | ||
dat-store get-provider Get the URL of your storage provider. | ||
dat-store unset-provider Reset your storage provider to the | ||
default: http://localhost:3472 | ||
dat-store login <username> [password] Logs you into your storage provider. | ||
dat-store logout Logs you out of your storage provider. | ||
dat-store run-service Runs a local storage provider. | ||
dat-store install-service Installs a storage service on your | ||
machine. This will run in the | ||
background while your computer is | ||
active. | ||
dat-store uninstall-service Uninstalls your local storage service. | ||
``` | ||
|
||
## How it works: | ||
|
||
- Uses [dat-pinning-service-client](https://github.com/beakerbrowser/dat-pinning-service-client) to talk to pinning services that adhere to [DEP 0003](https://www.datprotocol.com/deps/0003-http-pinning-service-api/) | ||
- Can start a local pinning service called `dat-pin` using `dat-pin install-service` (uses [os-service](https://www.npmjs.com/package/os-service)) | ||
- Runs on `127.0.0.1:3472` | ||
- Uses [dat-pinning-service-client](https://github.com/beakerbrowser/dat-pinning-service-client) to talk to storage providers that adhere to [DEP 0003](https://www.datprotocol.com/deps/0003-http-pinning-service-api/) | ||
- Can start a local called `dat-store` using `dat-store install-service` (uses [os-service](https://www.npmjs.com/package/os-service)) | ||
- Runs on `http://localhost:3472` | ||
- Binds to port `3282` for interacting with the P2P network | ||
- The service uses [dat-librarian](https://www.npmjs.com/package/dat-librarian) to manage archives | ||
- The service acts as a discovery gateway for [discovery-swarm-stream](https://www.npmjs.com/package/discovery-swarm-stream) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.