code blocks

This commit is contained in:
Adam 2024-07-20 23:40:07 -04:00
parent dac80deb7c
commit c656da2970

View file

@ -11,24 +11,37 @@ This started as a problem trying to play games with friends who are all on diffe
With auto-reload: With auto-reload:
* [Install cargo-watch](https://github.com/watchexec/cargo-watch?tab=readme-ov-file#install) * [Install cargo-watch](https://github.com/watchexec/cargo-watch?tab=readme-ov-file#install)
Then
```sh ```sh
watch -i client -cx run watch -i client -cx run
``` ```
Without auto-reload: Without auto-reload:
* `cargo run` ```sh
cargo run
```
### Client ### Client
* [Install Trunk](https://trunkrs.dev/#install) * [Install Trunk](https://trunkrs.dev/#install)
* `trunk serve --open`
Then
```sh
trunk serve --open
```
## Build: ## Build:
### Client ### Client
* `trunk build --release` ```sh
trunk build --release
```
### Server ### Server
* `cargo build` ```sh
cargo build
```
-- --
* The server automatically serves the built client from `/dist` at `0.0.0.0:3030` * The server automatically serves the built client from `/dist` at `0.0.0.0:3030`