I am having a .sh file under my root directory, I normally run this shell script to run the dfx call commands for loading my essential data types and test data into the backend using the below command
./service/preload/dataPreload.test.sh
now I have successfully deployed my code to the main net but i don’t know how to access the remote files or command line to run this test data shell script? can anybody show some light on this? Thanks in advance.
Hi,
If I understand you correctly, you need to add the parameter --network ic
The following command run on local:
dfx canister call tzService replaceAll "$DATA"
The same command run on Internet Computer
dfx canister --network ic call tzService replaceAll "$DATA"
For clarity this is the content of the file dataPreload.sh located inside ./service/preload/dataPreload.test.sh
i normally run it locally by just running
./service/preload/dataPreload.test.sh
from root directory.
dfx canister call miappetit createDishtype '(record {parentDishTypeId= 0; name="Soups"; description=""; dishTypeId=1})';
dfx canister call miappetit createDishtype '(record {parentDishTypeId= 1; name="Clear Soup - Broths"; description=""; dishTypeId=9})';
are you suggesting I just have to copy the contents and run it directly appending --network ic flag in the terminal?
Yes, I think it’s that easy
You should be in the root of your project you have deployed.
1 Like
How to know which path I am right now in IC? I can see only the local repo now? Is there any way to directly access the remote repo?
I am indeed talking about the root of your local project. The technology itself doesn’t allow you to have ssh-like remote access. But I think you need to run the command and learn, dFinity has a very comprehensive documentation here: Network deployment | Internet Computer Home
1 Like