Deploying Files to DStorage
Introduction
DStorage 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 or yarn installed on your machine.
Commands
The tpe CLI has the following commands:
tpe storage tasklist— shows the list of all tasks for the current account;tpe storage upload— upload application files to the storage.
Deploy the files
Follow the steps below to deploy files to a decentralized storage:
-
Install the
@thepowereco/clipackage globally:- npm
- Yarn
- pnpm
npm install -g @thepowereco/cliyarn global add @thepowereco/clipnpm add -g @thepowereco/cli -
Register an account:
tpe register -
Select the
devnetoption 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.io -
Go 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/appfolder, navigate to the/homefolder. -
Run the following command:
tpe storage uploadand specify the folder you want to upload, for example
./app. -
Enter the
addressandwiffrom 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 ="./.