Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

File share app

An example how one can use a Document store to store files.

Library

In the library folder you can find all code that is handling the file data.

Frontend

In the frontend folder you can find a React application using the library as a dependency.

Application is live at files.dao.xyx

CLI

There is a CLI application inside ./cli, that allows you to do the basic functionality.

By default the CLI stores its Peerbit state in ~/peerbit-file-share, so uploaded files can be resumed from a persistent local directory. Pass --directory null if you want to run it in ephemeral mode instead.

Install from remote:

npm install @peerbit/please

Now you can do

please put FILE 

Keep the please put ... process running while you want to seed the file.

and

please get HASH [OPTIONAL_SAVE_PATH]

e.g.

please put test.txt 
please get HASH ./some-folder

Run CLI locally

To run it locally:

First go to the root folder of the examples repo and build it

pnpm build

Then go back to the ./cli folder and now you can do:

node ./cli/lib/esm/bin.js instead of please to invoke the cli.

You can dial a local peer by passing its address with --peer. The older --bootstrap and --relay flags are still accepted as aliases, but the CLI now dials the peer directly and lets Peerbit discover shard roots automatically.