Files
SkyArtShop/backend/check-status.sh
Local Server 703ab57984 Fix admin route access and backend configuration
- Added /admin redirect to login page in nginx config
- Fixed backend server.js route ordering for proper admin handling
- Updated authentication middleware and routes
- Added user management routes
- Configured PostgreSQL integration
- Updated environment configuration
2025-12-13 22:34:11 -06:00

30 lines
1.0 KiB
Bash

#!/bin/bash
echo "========================================="
echo "Checking SkyArtShop Backend Status"
echo "========================================="
echo ""
# Check if database tables exist
echo "1. Checking database tables..."
PGPASSWORD=SkyArt2025Pass! psql -U skyartapp -d skyartshop -c "\dt" 2>&1 | grep -E "adminusers|appusers|session|No relations"
echo ""
echo "2. Checking if adminusers table exists and count..."
PGPASSWORD=SkyArt2025Pass! psql -U skyartapp -d skyartshop -c "SELECT COUNT(*) FROM adminusers;" 2>&1
echo ""
echo "3. Listing all admin users..."
PGPASSWORD=SkyArt2025Pass! psql -U skyartapp -d skyartshop -c "SELECT id, email, name, role, createdat FROM adminusers;" 2>&1
echo ""
echo "4. Checking if Node.js backend is running..."
ps aux | grep "node.*server.js" | grep -v grep
echo ""
echo "5. Checking if port 3001 is in use..."
netstat -tlnp 2>/dev/null | grep :3001 || ss -tlnp 2>/dev/null | grep :3001 || echo "Port 3001 not in use"
echo ""
echo "========================================="