#!/bin/bash # Start the dev server in background echo "Starting dev server..." npm run dev > /tmp/next-auth-test.log 2>&1 & SERVER_PID=$! # Wait for server to start sleep 8 # Try to register via API echo "Attempting to register admin user..." curl -X POST http://localhost:3000/api/auth/sign-up/email \ -H "Content-Type: application/json" \ -d '{ "email": "david@dhg.lol", "password": "admin", "name": "David Admin" }' \ 2>/dev/null echo "" echo "Checking if user was created..." sqlite3 prisma/dev.db "SELECT email, role FROM users;" # Cleanup kill $SERVER_PID 2>/dev/null