aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJoris2024-06-02 14:38:13 +0200
committerJoris2024-06-02 14:38:22 +0200
commit1019ea1ed341e3a7769c046aa0be5764789360b6 (patch)
tree1a0d8a4f00cff252d661c42fc23ed4c19795da6f /bin
parente8da9790dc6d55cd2e8883322cdf9a7bf5b4f5b7 (diff)
Migrate to Rust and Hyper
With sanic, downloading a file locally is around ten times slower than with Rust and hyper. Maybe `pypy` could have helped, but I didn’t succeed to set it up quickly with the dependencies.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dev-server16
1 files changed, 11 insertions, 5 deletions
diff --git a/bin/dev-server b/bin/dev-server
index d489127..cb124df 100755
--- a/bin/dev-server
+++ b/bin/dev-server
@@ -3,14 +3,20 @@ set -euo pipefail
if ! [ -f db.sqlite3 ]; then
- echo "Creating databise"
+ echo "Creating database"
sqlite3 db.sqlite3 < init-db.sql
sleep 1
fi
+export HOST="127.0.0.1"
+export PORT="8080"
+export KEY="1234"
+export DB="db.sqlite3"
+export FILES_DIR="files"
+
watchexec \
- --restart \
- --clear \
- --exts py \
- python src/main.py
+ --clear \
+ --restart \
+ -w src \
+ "RUST_LOG=info cargo run"