- Install Windows Subsystem for Linux:
Run in the command line processor with administrator rights:
wsl --install
- Install node.js in WSL:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
nvm install node
- Install dfx (Internet Computer SDK):
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
- Install node.js:
Under Ubuntu:
sudo apt install npm
Under MacOS:
Install package from the node.js webpage: https://nodejs.org/en/download
- Install dfx (Internet Computer SDK):
sh -ci "$(curl -fsSL https://internetcomputer.org/install.sh)"
We recommend Visual Studio Code, but you can also use any other IDE, if you prefer.
- Install Visual Studio Code.
https://code.visualstudio.com/
- If you choose Motoko for the workshop: Install the Motoko plugin (by DFINITY Foundation) in Visual Studio Code.
Menu: View -> Extensions: Search for "Motoko" (Motoko language support by DFINITY Foundation) and install this plugin.
- Clone the Git repository for local development:
git clone https://github.com/luc-blaeser/auction.git
cd auction
Or, alternatively if you do not have Git installed, you can download the repository as a zip-file from: https://github.com/luc-blaeser/auction
- Install the package dependencies in the source folder:
npm install
You have a choice of three possible backend languages:
No extra configuration is needed.
The backend source code is in src/motoko_backend.
- Replace the
dfx.jsonfile:
cp dfx_typescript.json dfx.json
The backend source code is in src/typescript_backend.
- Install
podman:
On Ubuntu/WSL:
sudo apt-get install podman
On Mac:
brew install podman
- Replace the
dfx.jsonfile:
cp dfx_rust.json dfx.json
- Install a recent version of Rust with WebAssembly support:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-unknown-unknown
- Install LLVM/Clang compiler:
On Ubuntu/WSL:
sudo apt-get install clang
On Mac:
brew install llvm
The backend source code is in src/rust_backend.
You can run the application locally with dfx:
In the folder auction (of the local repository folder):
dfx start --clean --background
npm run setup
npm start
A local web frontend runs at: http://localhost:3000/
The application is not yet fully functional as the backend is not yet implemented. This is the focus of the workshop.
After testing, you can terminate the npm process and then stop dfx:
dfx stop
