Developer Resources
Hello Example
Discover the dApp equivalent of the simple “Hello, world!” program
“Hello, World!” Example dApp
With separate backend and frontend
The following “Hello, world!” program is the IC-powered, decentralized equivalent of “Hello, world!” It features a separate frontend and backend canister that is serving a webpage. The application consists of a total of two canister smart contracts:
hello
– Simple backend canister that implements the application’s logichello_assets
– Simple frontend asset canister for serving the web user interface’s assets
To get started with the “Hello, World!” example, run the dfx new
command as outlined in the Rust and Motoko quickstart docs. The example repository provides the “Hello, world!” demo in both Rust as well as Motoko.
However, the hello
backend canister presents you with the same Candid interface, independently if it was implemented in Rust or Motoko:
hello_assets
is the frontend canister displaying an HTML website providing an argument text box, a Click Me!
button to call the function, and the call result displayed in a message box.
dfx
provides a generic frontend canister. The served assets can be changed in the project files and the dfx project settings.