diff options
author | Vika <vika@fireburn.ru> | 2022-05-24 17:18:30 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2022-05-24 17:18:30 +0300 |
commit | 5610a5f0bf1a9df02bd3d5b55e2cdebef2440360 (patch) | |
tree | 8394bcf1dcc204043d7adeb8dde2e2746977606e /kittybox-rs/dev.sh | |
parent | 2f93873122b47e42f7ee1c38f1f04d052a63599c (diff) | |
download | kittybox-5610a5f0bf1a9df02bd3d5b55e2cdebef2440360.tar.zst |
flake.nix: reorganize
- Kittybox's source code is moved to a subfolder - This improves build caching by Nix since it doesn't take changes to other files into account - Package and test definitions were spun into separate files - This makes my flake.nix much easier to navigate - This also makes it somewhat possible to use without flakes (but it is still not easy, so use flakes!) - Some attributes were moved in compliance with Nix 2.8's changes to flake schema
Diffstat (limited to 'kittybox-rs/dev.sh')
-rwxr-xr-x | kittybox-rs/dev.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kittybox-rs/dev.sh b/kittybox-rs/dev.sh new file mode 100755 index 0000000..fa39dcc --- /dev/null +++ b/kittybox-rs/dev.sh @@ -0,0 +1,17 @@ +#!/bin/sh +export RUST_LOG="info,kittybox=debug,retainer::cache=warn,h2=warn,rustls=warn" +export BACKEND_URI=file://./test-dir +export TOKEN_ENDPOINT=https://tokens.indieauth.com/token +export AUTHORIZATION_ENDPOINT=https://indieauth.com/auth +export COOKIE_SECRET=1234567890abcdefghijklmnopqrstuvwxyz +#export COOKIE_SECRET_FILE=/dev/null +if [[ "$1" == "watch" ]]; then + shift + exec systemfd --no-pid -s http::8080 -- cargo watch -x run "$@" +elif [[ "$1" == "run" ]]; then + shift 1 + exec cargo run "$@" +else + echo "Usage: ./dev.sh [watch|run]" + exit 1 +fi |