From c9c7adfe93b8deec9cfbfc8887fa5a10e1916616 Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Thu, 14 Sep 2023 12:19:32 -0400 Subject: [PATCH 1/2] fix(examples/build): let ctrl-c stop trunk --- examples/cargo-make/client-process.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cargo-make/client-process.toml b/examples/cargo-make/client-process.toml index b8e538071d..f098dc29c9 100644 --- a/examples/cargo-make/client-process.toml +++ b/examples/cargo-make/client-process.toml @@ -23,7 +23,7 @@ condition = { env_set = ["CLIENT_PROCESS_NAME"] } script = ''' if [ -z $(pidof ${CLIENT_PROCESS_NAME}) ]; then echo " Starting ${CLIENT_PROCESS_NAME}" - cargo make start-client ${@} & + cargo make start-client ${@} else echo " ${CLIENT_PROCESS_NAME} is already started" fi From d7b4519c3052abe77cd4d011640aede0997a44eb Mon Sep 17 00:00:00 2001 From: Joseph Cruz Date: Thu, 14 Sep 2023 12:20:07 -0400 Subject: [PATCH 2/2] doc(examples/build): add stop server hints --- examples/cargo-make/server-process.toml | 4 ++++ examples/login_with_token_csr_only/README.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/examples/cargo-make/server-process.toml b/examples/cargo-make/server-process.toml index 47efbdc546..d4e323d724 100644 --- a/examples/cargo-make/server-process.toml +++ b/examples/cargo-make/server-process.toml @@ -21,8 +21,12 @@ script = ''' [tasks.maybe-start-server] condition = { env_set = ["SERVER_PROCESS_NAME"] } script = ''' + YELLOW="\e[0;33m" + RESET="\e[0m" + if [ -z $(pidof ${SERVER_PROCESS_NAME}) ]; then echo " Starting ${SERVER_PROCESS_NAME}" + echo " ${YELLOW}>> Run cargo make stop to end process${RESET}" cargo make start-server ${@} & else echo " ${SERVER_PROCESS_NAME} is already started" diff --git a/examples/login_with_token_csr_only/README.md b/examples/login_with_token_csr_only/README.md index cea7cd8f89..d6c62b98e8 100644 --- a/examples/login_with_token_csr_only/README.md +++ b/examples/login_with_token_csr_only/README.md @@ -9,3 +9,5 @@ The `api-boundary` crate contains data structures that are used by the server an ## Getting Started See the [Examples README](../README.md) for setup and run instructions. + +You will also need to run `cargo make stop` to end the server process.