The admin panel deployed on Railway is still trying to connect to the old backend URL. Follow these steps to fix it immediately:
- Go to Railway Dashboard: railway.app
- Select your admin panel project:
easyearn-adminpanel-production - Go to Variables tab
- Add Environment Variable:
- Key:
NEXT_PUBLIC_API_URL - Value:
https://easyearn-backend-production-01ac.up.railway.app
- Key:
After setting the environment variable, Railway should automatically redeploy. If not:
- Go to Deployments tab
- Click Redeploy on the latest deployment
Once deployed, check the admin panel:
- Dashboard should load statistics
- User list should show users
- No more 404 errors in browser console
If the automatic deployment doesn't work:
-
Push latest code (already done):
git add . git commit -m "Fix backend URL with centralized config" git push origin main
-
Trigger new deployment in Railway dashboard
After the fix:
- ✅ Dashboard loads successfully
- ✅ All admin endpoints work
- ✅ No more
nexusbackend-productionerrors - ✅ Connects to
easyearn-backend-production-01ac.up.railway.app
Test the backend is working:
curl https://easyearn-backend-production-01ac.up.railway.app/api/admin/dashboard-statsShould return status 200 with JSON data.