whaleprep/run_server.sh
dev d3001612b2 PYQ clone: builder, CBT exam screen, grading, analytics dashboard
Axum + SQLite full-stack copy of the ZenithPrep PYQ practice app.
Paper builder with unseen-question exclusion, timed CBT screen with
palette and autosave, +4/-1 grading with numerical tolerance, per-question
analysis, history, dashboard with weak-subtopic tracking and coach notes.
2026-10-11 20:06:26 +05:30

13 lines
No EOL
530 B
Bash
Executable file

#!/bin/bash
# Starts the clone detached so it survives shell teardown. Usage: run_server.sh <port> <db>
set -e
DIR="/home/oiupoyt/my stuff yea/projects/zenith-pyq-clone"
PORT="${1:-8123}"
DB="${2:-/tmp/pyq_run.db}"
cd "$DIR"
rm -f "$DB" "$DB-wal" "$DB-shm"
PYQ_DB="$DB" PYQ_ADDR="127.0.0.1:$PORT" RUST_LOG=info \
setsid nohup ./target/debug/zenith-pyq-clone > "/tmp/pyq_server_$PORT.log" 2>&1 < /dev/null &
echo "started pid=$! port=$PORT db=$DB"
sleep 3
curl -s -o /dev/null -w "health=%{http_code}\n" "http://127.0.0.1:$PORT/"