From 0617663b249f9ca488e5de652108b17d67fbaf45 Mon Sep 17 00:00:00 2001 From: Vika Date: Sat, 29 Jul 2023 21:59:56 +0300 Subject: Moved the entire Kittybox tree into the root --- dev.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 dev.sh (limited to 'dev.sh') diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..979b85a --- /dev/null +++ b/dev.sh @@ -0,0 +1,32 @@ +#!/bin/sh +if [[ -z $KITTYBOX_LOG ]]; then + export KITTYBOX_LOG="kittybox=debug,retainer::cache=warn,h2=info,rustls=info,tokio=info,tower_http::trace=debug,sqlx=trace" +fi +#export BACKEND_URI=file://./test-dir +export BACKEND_URI="postgres://localhost?dbname=kittybox&host=/run/postgresql" +export JOB_QUEUE_URI="postgres://localhost?dbname=kittybox&host=/run/postgresql" +export BLOBSTORE_URI=file://./media-store +export AUTH_STORE_URI=file://./auth-store +export COOKIE_SECRET=1234567890abcdefghijklmnopqrstuvwxyz +#export COOKIE_SECRET_FILE=/dev/null +if [[ "$1" == "watch" ]]; then + shift + exec systemfd --no-pid -s http::8080 -- cargo watch \ + --ignore '.direnv' \ + --ignore '*~' \ + -L "$KITTYBOX_LOG" \ + -x run \ + "$@" +elif [[ "$1" == "run" ]]; then + shift 1 + export RUST_LOG="$KITTYBOX_LOG" + exec cargo run "$@" +elif [[ "$1" == "_run" ]]; then + shift 1 + release=$1 + shift 1 + exec target/${release}/kittybox "$@" +else + echo "Usage: ./dev.sh [watch|run]" + exit 1 +fi -- cgit 1.4.1