Skip to content

Commit

Permalink
Remove: duplicate page (#3898)
Browse files Browse the repository at this point in the history
* Remove duplicate page

* Update overview.mdx

* Update overview.mdx
  • Loading branch information
jessiemongeon1 authored Dec 18, 2024
1 parent 9a997e4 commit f7dc14b
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 110 deletions.
2 changes: 1 addition & 1 deletion docs/developer-docs/getting-started/explore-examples.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ https://2drrs-wqaaa-aaaab-qblbq-cai.icp1.io

The **backend canister** URL will open the [Candid UI](/docs/current/developer-docs/smart-contracts/candid/candid-concepts) which can interact directly with the backend canister's methods. A **method** is a function exposed by the canister that can be called by a user, another canister, or the application's frontend.

The **frontend** URL will open the application's frontend user interface. To create this frontend, the project's React files (shown in the ICP Ninja code editor within the `frontend/` folder) have been compiled and deployed as an [asset canister](/docs/current/developer-docs/web-apps/application-frontends/default-frontend).
The **frontend** URL will open the application's frontend user interface. To create this frontend, the project's React files (shown in the ICP Ninja code editor within the `frontend/` folder) have been compiled and deployed as an [asset canister](/docs/current/developer-docs/web-apps/application-frontends/overview).

:::info
This application will be live for 20 minutes. After 20 minutes, it will expire, and the URLs will become invalid. The project code will still be accessible, and you can redeploy the application at any time to view it for another 20 minutes.
Expand Down

This file was deleted.

20 changes: 19 additions & 1 deletion docs/developer-docs/web-apps/application-frontends/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,25 @@ The [Express HTTP server](https://demergent-labs.github.io/azle/) package via Az

The frontend canister can host roughly 1GiB in static files. It is recommended that you distribute your files across multiple canisters if the total size of all your assets begins to exceed this amount. Once you exceed this figure, your canister may fail to upgrade.

## Dynamic URLs
## Application URLs

Frontend canisters serve the application's web assets via a URL that contains the <GlossaryTooltip>canister</GlossaryTooltip>'s ID. Local deployments use local URLs such as `http://127.0.0.1:4943/?canisterId=<canister-id>`, while applications deployed to the mainnet use public URLs containing the canister's ID followed by `.ic0.app`, `.icp0.io` or `raw.icp0.io`.

### Raw HTTP interfaces

The `raw.icp0.io` domain provides a way to access the raw HTTP interface of that canister. For local deployments that want to simulate the behavior of the `raw.icp0.io` domain, you must implement a method in your canister that consumes an HTTP request and outputs an HTTP response. Here is an example written in Motoko:

```motoko no-repl
public shared(msg) func http_request(req: HttpRequest) : async HttpResponse {
{
status = { code = 200; reason = "OK" };
headers = [( "Content-Type", "text/plain" )];
body = Text.encodeUtf8("Hello, World!");
}
};
```

### Dynamic URLs

Dynamic URLs are currently not supported by the default frontend canister.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ Start by creating the file `src/poll_frontend/src/index.html` that contains the
**What does this code do?**
The HTML code above is a simple form that provides the end user with options to select using radio buttons. There is nothing 'Web3' or specific to ICP about this code.

Then, the `<head>` tag is used to include some basic CSS for the page's styling. To learn more about adding a stylesheet, see: [add a stylesheet](/docs/current/developer-docs/web-apps/application-frontends/default-frontend).
Then, the `<head>` tag is used to include some basic CSS for the page's styling. To learn more about adding a stylesheet, see: [add a stylesheet](/docs/current/developer-docs/web-apps/application-frontends/overview).
:::

Next, you will need a `webpack.config.js` file that defines several parameters to facilitate your local development web server.
Expand Down
20 changes: 11 additions & 9 deletions plugins/utils/redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const redirects = `
/docs/rust-guide/rust-intro /docs/current/developer-docs/backend/rust/
/docs/languages/languages-overview /docs/current/developer-docs/smart-contracts/write/overview
/docs/current/developer-docs/smart-contracts/write/choosing-language /docs/current/developer-docs/smart-contracts/write/overview
/docs/current/developer-docs/frontend/my-contacts /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/frontend/my-contacts /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/ic-interface-spec /docs/current/references/ic-interface-spec
/docs/interface-spec /docs/current/references/ic-interface-spec
/docs/current/developer-docs/updates/computation-and-storage-costs /docs/current/developer-docs/gas-cost
Expand All @@ -77,7 +77,7 @@ const redirects = `
/docs/current/developer-docs/build/using-an-agent /docs/current/developer-docs/smart-contracts/write/overview
/docs/current/developer-docs/build/backend/reproducible-builds /docs/current/developer-docs/smart-contracts/best-practices/reproducible-builds
/docs/current/developer-docs/build/cdks/ /docs/current/motoko/main/getting-started/motoko-introduction
/docs/current/developer-docs/build/frontend/default-frontend /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/build/frontend/default-frontend /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/build/frontend/webpack-config /docs/current/developer-docs/web-apps/application-frontends/overview#modifying-the-webpack-configuration
/docs/current/developer-docs/build/install-upgrade-remove /docs/current/developer-docs/getting-started/install
/docs/current/developer-docs/build/languages/rust/* /docs/current/developer-docs/backend/rust/
Expand Down Expand Up @@ -109,8 +109,8 @@ const redirects = `
/docs/developers-guide/sdk-guide /docs/current/developer-docs/getting-started/install
/docs/developers-guide/troubleshooting /docs/current/developer-docs/getting-started/troubleshooting
/docs/developers-guide/tutorials-intro /docs/current/motoko/main/getting-started/motoko-introduction
/docs/developers-guide/tutorials/default-frontend /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/developers-guide/tutorials/my-contacts /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/developers-guide/tutorials/default-frontend /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/developers-guide/tutorials/my-contacts /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/developers-guide/webpack-config /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/developers-guide/work-with-languages /docs/current/developer-docs/smart-contracts/write/overview
/docs/developers-guide/working-with-canisters /docs/current/developer-docs/smart-contracts/maintain/settings
Expand Down Expand Up @@ -339,8 +339,8 @@ const redirects = `
/docs/current/developer-docs/setup/best-practices/storage /docs/current/developer-docs/smart-contracts/best-practices/storage
/docs/current/developer-docs/setup/best-practices/troubleshooting /docs/current/developer-docs/smart-contracts/best-practices/troubleshooting
/docs/current/developer-docs/frontend/ /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/frontend/default-frontend /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/frontend/add-stylesheet /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/frontend/default-frontend /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/frontend/add-stylesheet /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/frontend/boilerplate-frontend /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/frontend/existing-frontend /docs/current/developer-docs/web-apps/application-frontends/existing-frontend
/docs/current/developer-docs/production/custom-domain/ /docs/current/developer-docs/web-apps/custom-domains/using-custom-domains
Expand Down Expand Up @@ -597,8 +597,8 @@ const redirects = `
/docs/current/references/t-ecdsa-how-it-works /docs/current/references/t-sigs-how-it-works
/docs/current/developer-docs/web-apps/application-frontends/bundlers /docs/current/developer-docs/web-apps/application-frontends/webpack
/docs/current/developer-docs/web-apps/application-frontends/webpack-dev-server /docs/current/developer-docs/web-apps/application-frontends/webpack
/docs/current/developer-docs/web-apps/application-frontends/serving-static-assets /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/web-apps/application-frontends/custom-frontend /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/web-apps/application-frontends/serving-static-assets /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/web-apps/application-frontends/custom-frontend /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/security/rust-canister-development-security-best-practices /docs/current/developer-docs/security/security-best-practices/inter-canister-calls
/docs/developers-guide/computation-and-storage-costs.html /docs/current/developer-docs/gas-cost
/docs/current/developer-docs/getting-started/ /docs/current/developer-docs/getting-started/network-overview
Expand Down Expand Up @@ -657,7 +657,9 @@ const redirects = `
/docs/current/developer-docs/defi/tokens/ledger/usage/overview /docs/current/developer-docs/defi/overview
/docs/current/developer-docs/web-apps/obtain-verify-ic-pubkey /docs/current/developer-docs/developer-tools/cli-tools/cli-reference/dfx-ping
/docs/current/developer-docs/web-apps/design-dapps /docs/current/developer-docs/smart-contracts/overview/introduction
/docs/current/developer-docs/web-apps/application-frontends/add-stylesheet /docs/current/developer-docs/web-apps/application-frontends/default-frontend
/docs/current/developer-docs/web-apps/application-frontends/add-stylesheet /docs/current/developer-docs/web-apps/application-frontends/overview
/docs/current/developer-docs/web-apps/application-frontends/default-frontend /docs/current/developer-docs/web-apps/application-frontends/overview
`
.split(/[\r\n]+/)
Expand Down
1 change: 0 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ const sidebars = {
id: "developer-docs/web-apps/application-frontends/overview",
},
items: [
"developer-docs/web-apps/application-frontends/default-frontend",
"developer-docs/web-apps/application-frontends/existing-frontend",
"developer-docs/web-apps/application-frontends/asset-security",
"developer-docs/web-apps/application-frontends/webpack",
Expand Down

0 comments on commit f7dc14b

Please sign in to comment.