This example DApp demonstrates how two or more peers can connect together and securely share private content together without the need for a central server. You can point the application to your local Lightstreams Node (localhost:9000). By default, it connects to our public gateway on the Sirius testnet, https://gateway.sirius.lightstreams.io.
The example is only made of static js/css/html and uses react, redux, and styled-components under the hood. The files that you upload are stored on the Lightstreams Node and the files' metadata are stored on browser's localStorage. If you delete your localStorage, you will no longer see what files have been uploaded to your node.
In order to discover other peers with whom to share content, the example application uses the the js-ipfs implementation of IPFS for peer-discovery. This is a bit overkill for now, but could allow for information or file-exchange before the actual sharing of private content.
- 1.Follow the steps in the README to install & run the application (the application should be running on http://localhost:8080 (we'll call this running app, node1)
- 2.Create an account with a password. This will generate a public key that you should write down somewhere, it can be used to login (with your password) and unlock your wallet on the Lightstreams Node.
- 3.Request Lightstreams free test tokens to the newly created address (https://discuss.lightstreams.network/t/request-test-tokens/64)
- 4.Upload some content
- 5.Copy the File Meta Hash (under the "Files" sections)
- 6.Paste the File Meta Hash in the "Download File" section
- 7.Click on the Link to download the file
Once you've uploaded some content, you'll probably want to grant access to someone else and share it with them.
- 1.In a new browser (if you use Chrome, launch Firefox or Safari), we'll launch another app (which we'll call node2). Open the same URL: http://localhost:8080