very basic scripts to "publish" in debug or release mode

main
nick 2024-07-26 21:03:17 -04:00
parent 70ea44ba27
commit 7e3b9f492a
2 changed files with 16 additions and 0 deletions

7
dev.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
(trap 'kill 0' SIGINT; \
bash -c 'cd frontend; trunk serve --proxy-backend=http://[::1]:8081/api/' & \
bash -c 'cargo watch -- cargo run --bin server -- --port 8081')

9
prod.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
pushd frontend
trunk build
popd
cargo run --bin server --release -- --port 8080 --static-dir ./dist