This project is provided by the IC-Academy to help you get started with development on the Internet Computer using Svelte, TypeScript and Vite.
The main goal of this repository is to demonstrate how different Svelte components can access separate Motoko backend functions on the Internet Computer.
The project has the following main features:
To clone and use the Github repository for your own purpose following the commands below.
Note to get a clean git repository. A tool called “digit” is used. Make sure you have it installed. If you haven't installed it yet, you can do so using the following command.
Tested on DFX version: 0.24.1
npm install -g degit
Summary of installation steps:
mkdir myapp && cd myapp
npx degit https://github.com/samlinux-development/ic-svelte
npm install
dfx start --clean --background
# local replica or Motoko playground deployment
dfx deploy | dfx deploy --playground
dfx canister id frontend
Open your browser and use the following URL scheme:
Check the backend functions with the CLI cammand below:
# sayHelloTo function
dfx canister call backend sayHelloTo '("Roland")'
# calc function
dfx canister call backend calc '(1,2)'