From 1019ea1ed341e3a7769c046aa0be5764789360b6 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 2 Jun 2024 14:38:13 +0200 Subject: 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. --- bin/dev-server | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'bin') 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" -- cgit v1.2.3