Fix dashboard authentication and routing issues
- Fix NODE_ENV=production cookie security issue for local development - Add production API URL configuration (.env.production) - Enable SPA routing with serve -s flag for frontend - Fix React hooks violation in DashboardPage (error #310) - Move useQuery hooks before conditional returns - Rebuild frontend with all fixes applied Resolves dashboard 401 errors, 404 routing issues, and React error #310
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
set -e
|
||||
|
||||
# Environment variables
|
||||
export NODE_ENV="production"
|
||||
export NODE_ENV="development"
|
||||
export PORT=3334
|
||||
export CORS_ORIGIN="https://urltrackertool.com"
|
||||
export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/redirect_intelligence_v2?schema=public"
|
||||
@@ -36,7 +36,7 @@ sleep 5
|
||||
# Start Frontend service
|
||||
echo "$(date): Starting Frontend service on port 3000..." >> /var/log/catch-redirect.log
|
||||
cd /root/catch_redirect/apps/web
|
||||
nohup serve dist -l 3000 >> /var/log/catch-redirect-frontend.log 2>&1 &
|
||||
nohup serve dist -s -l 3000 >> /var/log/catch-redirect-frontend.log 2>&1 &
|
||||
FRONTEND_PID=$!
|
||||
echo "$(date): Frontend service started with PID $FRONTEND_PID" >> /var/log/catch-redirect.log
|
||||
|
||||
|
||||
Reference in New Issue
Block a user