updated README.md

This commit is contained in:
2021-03-03 12:35:21 -06:00
parent dcb18aa358
commit cb3ca5dbef
2 changed files with 56 additions and 9 deletions

View File

@@ -1,8 +1,48 @@
# About
`repertory-js` is a client library used to communicate with `repertory's` remote API.
## Example Usage
``` javascript
`repertory-js` is a Node.js module for interfacing with `repertory's` remote mount API.
## Installing
```shell
npm i @scottg1/repertory-js
```
## Repertory Configuration
A Repertory mount must be active with the `EnableRemoteMount` setting enabled. `RemoteToken` should
also be set to a strong, random password.
### Enabling Sia Remote Mount API on Windows Systems
```shell
repertory.exe -unmount
repertory.exe -set RemoteMount.EnableRemoteMount true
repertory.exe -set RemoteMount.RemoteToken "my password"
[Optional - change listening port]
repertory.exe -set RemoteMount.RemotePort 202020
```
### Enabling Sia Remote Mount API on *NIX Systems
```shell
./repertory -unmount
./repertory -set RemoteMount.EnableRemoteMount true
./repertory -set RemoteMount.RemoteToken "my password"
[Optional - change listening port]
./repertory -set RemoteMount.RemotePort 202020
```
### Skynet and ScPrime Mounts
* For Skynet mounts, add `-sk` argument to all commands listed above.
* For ScPrime mounts, add `-sp` argument to all commands listed above.
## Example API Usage
```javascript
const rep = require('@scottg1/repertory-js');
@@ -66,4 +106,4 @@ await api.file.download('/my_file.txt', 'C:\\my_file.txt', progress_cb, false, t
// Upload a local file
await api.file.upload('C:\\my_file.txt', '/my_file.txt', progress_cb);
```
```