Skip to content

Commit

Permalink
Add more information to website.
Browse files Browse the repository at this point in the history
Changes to be committed:
	modified:   website/docs/tutorial/index.mdx
	modified:   website/versioned_docs/version-0.20/getting-started/build-a-sample-app.mdx
	modified:   website/versioned_docs/version-0.20/tutorial/index.mdx
  • Loading branch information
moyeah committed Sep 18, 2023
1 parent ea3c196 commit dc2c914
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
18 changes: 15 additions & 3 deletions website/docs/tutorial/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,24 @@ Now, let's create an `index.html` at the root of the project.
Run the following command to build and serve the application locally.

```bash
trunk serve --open
trunk serve --open // remove option '--open' to not open your default browser
```

Trunk will open your application in your default browser, watch the project directory and helpfully rebuild your
application if you modify any source files. If you are curious, you can run `trunk help` and `trunk help <subcommand>`
for more details on what is happening.
application if you modify any source files.
This will fail if the socket is being used by another application.
By default server will listening at address '127.0.0.1' and port '8080' [localhost:8080](http://127.0.0.1:8080).
To change it, create the following file and edit as needed:

```toml title="Trunk.toml"
[serve]
# The address to serve on.
address = "127.0.0.1" // "0.0.0.0" for WAN
# The port to serve on.
port = 8000
```

If you are curious, you can run `trunk help` and `trunk help <subcommand>` for more details on what is happening.

### Congratulations

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ To convert this simple command line application to a basic Yew web application,

#### Update Cargo.toml

Add `yew` to the list of dependencies.
Add `yew` to the list of dependencies editing file:

```toml title=Cargo.toml
[package]
Expand All @@ -58,6 +58,8 @@ edition = "2021"
yew = { version = "0.20.0", features = ["csr"] }
```

or using `cargo add yew -F csr`.

:::info

You only need feature `csr` if you are building an application.
Expand Down Expand Up @@ -128,10 +130,21 @@ Finally, add an `index.html` file in the root directory of your app.
Run the following command to build and serve the application locally.

```bash
trunk serve
trunk serve // add option '--open' to open your default browser
```

Trunk will rebuild your application if you modify any of its source code files.
This will fail if the socket is being used by another application.
By default server will listening at address '127.0.0.1' and port '8080' [localhost:8080](http://127.0.0.1:8080).
To change it, create the following file and edit as needed:

```toml title="Trunk.toml"
[serve]
# The address to serve on.
address = "127.0.0.1" // "0.0.0.0" for WAN
# The port to serve on.
port = 8000
```

## Congratulations

Expand Down
18 changes: 15 additions & 3 deletions website/versioned_docs/version-0.20/tutorial/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,24 @@ Now, let's create an `index.html` at the root of the project.
Run the following command to build and serve the application locally.

```bash
trunk serve --open
trunk serve --open // remove option '--open' to not open your default browser
```

Trunk will open your application in your default browser, watch the project directory and helpfully rebuild your
application if you modify any source files. If you are curious, you can run `trunk help` and `trunk help <subcommand>`
for more details on what's happening.
application if you modify any source files.
This will fail if the socket is being used by another application.
By default server will listening at address '127.0.0.1' and port '8080' [localhost:8080](http://127.0.0.1:8080).
To change it, create the following file and edit as needed:

```toml title="Trunk.toml"
[serve]
# The address to serve on.
address = "127.0.0.1" // "0.0.0.0" for WAN
# The port to serve on.
port = 8000
```

If you are curious, you can run `trunk help` and `trunk help <subcommand>` for more details on what's happening.

### Congratulations

Expand Down

0 comments on commit dc2c914

Please sign in to comment.