How to Deploy Files to a Decentralized Storage (DStorage)
Table of contents
Introduction
Power Storage is a revolutionary decentralized storage platform that offers you a fast, secure, and reliable way to store and distribute your data.
Prerequisites
Make sure you have npm
installed on your machine.
Deploy the files
Follow the steps below to deploy files to a decentralized storage:
Install the
@thepowereco/cli
package globally using npm:npm install -g @thepowereco/cli
Register an account with
tpe
:tpe register
Select the
devnet
option and make a note of the provided information, as it will be needed later. Here is the example:✔ Please, select the network: · devnet
Loading... done
Network: devnet
Chain number: 1
Account address: AA100000001677740890
Account seed phrase: peanut shadow approve put grain outdoor hand program angry tiger cry diary
Account wif: L2NzLJEtduehhwxT7cidd13tNDmsnZn9neoYa9wRg9W89gDcdeVu
To replenish the balance of your account please visit: https://faucet.thepower.ioGo to the Faucet.
Select the chain 1 option:
Copy the provided address into the information from step 3.
Click Send tokens:
Navigate to the folder one level above the folder you want to upload. For example, if you want to upload the
/home/app
folder, navigate to the/home
folder.Run the following command:
tpe upload
and specify the folder you want to upload, for example
./app
.Enter the
address
andwif
from step 3. The files will be uploaded.After the files are uploaded, the location where they will be stored will be indicated.
To deploy a basic create-react-app
template, modify the paths so that they start from the root domain.
For example, replace all instances of ="/
with ="./
.
Result will be like this: https://storage11.thepower.io/AA100000001677739053/testapp2/