Code generated by executing dfx new hello
; it demonstrates how to compile Motoko sources into WebAssembly to be served via Node.js.
This project requires version 0.8.4
of the DFINITY Canister SDK being installed. To verify, run dfx --version
.
$ git clone https://github.com/tglaeser/hello.git
$ cd ./hello
$ tree -L 4 .
.
├── LICENSE
├── README.md
├── dfx.json
├── package-lock.json
├── package.json
├── src
│ ├── hello
│ │ └── main.mo
│ └── hello_assets
│ ├── assets
│ │ ├── favicon.ico
│ │ ├── logo.png
│ │ ├── main.css
│ │ └── sample-asset.txt
│ └── src
│ ├── index.html
│ └── index.js
└── webpack.config.js
$ npm install
$ dfx start
$ dfx canister create --all
$ dfx build
$ dfx canister install --all
$ dfx canister call hello greet "World"
Open a browser and navigate to the address and port your local IC is listening to: http://<host>:<port>/?canisterId=<hello_assets_cid>
. See value networks.local.bind
in file dfx.json for the <host>:<port>
binding, you can also execute dfx config
to see the configuration. The <hello_assets_cid>
value was printed to the console when previously installing the canister.
- SDK documentation - For the SDK, the Candid Specification, and the Motoko language.
- WebAssembly home page - For the WASM binary instruction format.