From 740ad3cf61ce909c9ae69ec8188197b12c25cbcd Mon Sep 17 00:00:00 2001 From: lqdev Date: Thu, 22 Feb 2024 20:42:58 +0100 Subject: [PATCH] update readme to use just --- README.md | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 1a38d1d..151c038 100644 --- a/README.md +++ b/README.md @@ -14,22 +14,19 @@ You have been warned. ## Building -To serve the website on `http://localhost:8080`: +The following commands require [`just`](https://github.com/casey/just). +Running a development server requires [`cargo-watch`](https://github.com/watchexec/cargo-watch). + +To serve the website on `http://localhost:8080` for development: ```sh -cargo run -p treehouse serve +just ``` -This will start a server on port 8080. You can change the port by using `--port`, but note that you'll also have to override the website address. The treehouse hardcodes all URLs to point to its own address and therefore needs a base URL, provided with `$TREEHOUSE_SITE` or more permanently by setting `site` inside `treehouse.toml`: +This will start a server on port 8080. You can change the port by using the variable `port`: ```sh -TREEHOUSE_SITE="http://localhost:8081" cargo run -p treehouse serve --port 8081 -``` - -If you're developing, you may wanna use [`cargo-watch`](https://crates.io/crates/cargo-watch): - -```sh -cargo watch -- cargo run -p treehouse serve +just port=8081 ``` The website will reload itself automatically if you change any file in the repository.