feat: adding metadata button

This commit is contained in:
vcadoux
2026-01-27 09:14:11 +01:00
parent ef70de2676
commit 69b54f1ae8
10 changed files with 8260 additions and 0 deletions

75
start-dev.sh Executable file
View File

@@ -0,0 +1,75 @@
#!/usr/bin/env bash
set -euo pipefail
PROJECT_ROOT="$(cd "$(dirname "$0")" && pwd)"
export PATH="$HOME/.local/go/bin:$PATH"
echo "Project root: $PROJECT_ROOT"
# Stop any existing dev servers first
if [ -x "$PROJECT_ROOT/stop-dev.sh" ]; then
echo "Stopping existing dev servers..."
"$PROJECT_ROOT/stop-dev.sh" || true
fi
cd "$PROJECT_ROOT"
echo "Starting backend..."
if [ -f filebrowser.log ]; then
mv filebrowser.log filebrowser.log.$(date +%s)
fi
nohup go run main.go > filebrowser.log 2>&1 &
backend_pid=$!
echo $backend_pid > filebrowser.pid
echo "Backend pid: $backend_pid"
echo "Waiting for backend to listen on 127.0.0.1:8080..."
for i in $(seq 1 15); do
if ss -ltn | grep -q "127.0.0.1:8080"; then
echo "Backend listening."
break
fi
sleep 1
done
echo "Starting frontend (Vite)..."
if [ ! -d "$PROJECT_ROOT/frontend" ]; then
echo "ERROR: frontend directory not found: $PROJECT_ROOT/frontend"
exit 1
fi
cd "$PROJECT_ROOT/frontend"
if [ ! -d node_modules ]; then
if command -v pnpm >/dev/null 2>&1; then
pnpm install --no-audit --no-fund
else
npm install --no-audit --no-fund
fi
fi
if [ -f "$PROJECT_ROOT/frontend-dev.log" ]; then
mv "$PROJECT_ROOT/frontend-dev.log" "$PROJECT_ROOT/frontend-dev.log.$(date +%s)"
fi
if command -v pnpm >/dev/null 2>&1; then
nohup pnpm run dev > "$PROJECT_ROOT/frontend-dev.log" 2>&1 &
frontend_pid=$!
else
nohup npm run dev > "$PROJECT_ROOT/frontend-dev.log" 2>&1 &
frontend_pid=$!
fi
echo $frontend_pid > "$PROJECT_ROOT/frontend.pid"
echo "Frontend pid: $frontend_pid"
echo "Waiting for frontend on 5173..."
for i in $(seq 1 10); do
if ss -ltn | grep -q ":5173"; then
echo "Frontend listening."
break
fi
sleep 1
done
echo "Started. Backend logs: $PROJECT_ROOT/filebrowser.log"
echo "Frontend logs: $PROJECT_ROOT/frontend-dev.log"
echo "Open http://localhost:5173/ to use the dev UI"