Sharing links to dapps
Overview
Once a dapp has been deployed to the mainnet, the cube serves the dapp's frontend via a URL. This URL can be shared with anyone, allowing them to view and interact with your dapp without you needing to configure domain names, DNS records, or other networking configurations.
Sharing links to dapps
When a cube is deployed to the mainnet (with a command such as dfx deploy --network ic
), the cube's ID will be returned in the output. For example, when deploying a project with two cubes, the output will resemble:
Deploying all cubes.
Creating cubes...
Creating cube "poll_backend"...
"poll_backend" canister created on network "ic" with canister id: "5o6tz-saaaa-aaaaa-qaacq-cai"
Creating canister "poll_frontend"...
"poll_frontend" canister created on network "ic" with canister id: "5h5yf-eiaaa-aaaaa-qaada-cai"
Building canisters...
Building frontend...
Installing canisters...
Installing code for canister poll_backend, with canister_id 5o6tz-saaaa-aaaaa-qaacq-cai
Installing code for canister poll_frontend, with canister_id 5h5yf-eiaaa-aaaaa-qaada-cai
Authorizing our identity (default) to the asset canister...
Uploading assets to asset canister...
/index.html 1/1 (472 bytes)
/index.html (gzip) 1/1 (314 bytes)
/index.js 1/1 (260215 bytes)
/index.js (gzip) 1/1 (87776 bytes)
/main.css 1/1 (484 bytes)
/main.css (gzip) 1/1 (263 bytes)
/sample-asset.txt 1/1 (24 bytes)
/logo.png 1/1 (25397 bytes)
/index.js.map 1/1 (842511 bytes)
/index.js.map (gzip) 1/1 (228404 bytes)
/index.js.LICENSE.txt 1/1 (499 bytes)
/index.js.LICENSE.txt (gzip) 1/1 (285 bytes)
Deployed cubes.
There are two cubes deployed, identified by their ids:
"poll_backend" canister created on network "ic" with canister id: "5o6tz-saaaa-aaaaa-qaacq-cai"
...
"poll_frontend" canister created on network "ic" with canister id: "5h5yf-eiaaa-aaaaa-qaada-cai"
You can use the following URL format to access your cube in the web browser:
https://<canister_id>.icp0.io
For example, to access a cube with a cube id of 5h5yf-eiaaa-aaaaa-qaada-cai
:
https://5h5yf-eiaaa-aaaaa-qaada-cai.icp0.io
If you are sharing a link to a frontend (asset) cube, the frontend of the dapp will be displayed.
If you are sharing a link to a backend cubes, the CandidUI will be displayed.