feat: auth by default, theme toggle, CoderPad startup, review fixes
- Require a session on every route; public routes opt out with @allow_anonymous - Split password hashing and pepper loading into passwords.py - Add a system/light/dark theme toggle backed by light-dark() colors - Ignore stale 401s from an earlier session, PATCH only changed book fields, and block overlapping journal-entry saves - Add bin/start and CoderPad Vite server settings for the pad's start/restart - Rewrite README as a mise onboarding guide; expand .gitignore - Include review-round fixes and tests
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# The pad template's node_modules lacks this app's extra packages (router, Tailwind); a no-op once installed.
|
||||
npm install --no-audit --no-fund
|
||||
|
||||
# Locally the deps live in the mise venv; the pad's system python3 has Flask and psycopg2 preinstalled.
|
||||
PYTHON=python3
|
||||
[ -x .venv/bin/python ] && PYTHON=.venv/bin/python
|
||||
|
||||
"$PYTHON" backend/app.py &
|
||||
FLASK_PID=$!
|
||||
|
||||
until curl -s -o /dev/null http://localhost:5000/api/health; do
|
||||
if ! kill -0 "$FLASK_PID" 2>/dev/null; then
|
||||
echo "Flask exited during startup; fix the error above (often a missing dependency or an unreachable PostgreSQL) and restart." >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.5
|
||||
done
|
||||
|
||||
exec node_modules/.bin/vite
|
||||
Reference in New Issue
Block a user