Node version: v16.18.1 Updated for dfx 0.12.1 and @dfinity packages: 0.14.0
Boilerplate ReactJS/Typescript with authentication to a local II
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
-
Install Internet Identity locally from: https://github.com/dfinity/internet-identity
-
Clone the repo
git clone https://github.com/gabrielnic/dfinity-react
-
Install NPM packages
yarn
-
Start dfx
dfx start
-
Update
.env
with the II canister id eg:Installing code for canister internet_identity, with the canister_id from internet-identity/.dfx/local/canister_ids.json -> local: eg: rwlgt-iiaaa-aaaaa-aaaaa-cai
-
Deploy
dfx deploy
-
Manual Deploy (replaces point 6)
dfx canister create --all
dfx generate
dfx build
dfx canister install --all
Copy front-end canister id from .dfx/local/canister_ids.json and replace in the url below
Navigate to http://<frontend_canister_id>.localhost:8000/
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.