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
This commit is contained in:
29
backend/check-status.sh
Normal file
29
backend/check-status.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/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 "========================================="
|
||||
Reference in New Issue
Block a user