Test-cases
- Public file
- Private file
- Share private file
Networking scenarios
- Browser
- Standalone
- Browser -> Standalone
- Standalone -> Browser
- Browser -> Standalone -> Browser
src/server
- runs a nodejs + express server
- runs a helia node, listening over websockets
- creates a Public file using
src/ExamplePulbicFile
- creates a Private file using
src/ExamplePrivateFile
- exposes
POST /generate_share
API for the shareing the above example private file
src/browser
- Exposes methods in browser to run through console
createBrowserNode()
method to create a helia node anddial()
method to connect with servernew ExamplePublicFile(node).write()
methods allows to create a public file, andread()
to read contentExamplePublicFile.load()
methods allows loading PublicDiretory created on other nodes in network- Similar methods are available for
ExamplePrivateFile
new Recipient(node)
create a receipient object through which shared files can be accepted.