Skip to content

Latest commit

 

History

History
81 lines (58 loc) · 1.58 KB

README.md

File metadata and controls

81 lines (58 loc) · 1.58 KB

Rust + Typescript + Internet Identity template example. Powered by Dfinity

This repository is a customized example for Dfinity, Typescript and Rust development. Not quite optimal, not quite pretty, but working. Just take and use.

You can easily deploy a local network and log in through the Internet identity.

Special thanks to Dfinity/CanCan

Quickstart

sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

./run.sh

Quickstop :)

dfx stop

Quickstart with explaination

Initialize Internet Identity submodule

git submodule init
git submodule update

Install requirements such as internet-computer SDK and rust (with wasm support)

sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown

To start network with internet-identity (first launch will be long ~ 10min)

./run.sh

To stop network

dfx stop

If backend canister updated

dfx deploy backend

Local development

Start network

./run.sh

Start frontend and open http://localhost:3000

npm run dev

Technical area

Manual start internet identity

cd internet-identity
II_ENV=development dfx deploy --no-wallet --argument '(null)'
echo "http://localhost:8000?canisterId=$(dfx canister id internet_identity)"

Find process by error "Address in use"

ps aux | grep dfx