File size: 1,506 Bytes
4f163ba |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
#!/bin/bash
echo "π± Seeding Deployed Database"
echo "=============================="
echo ""
echo "This script will help you seed your deployed backend database with initial data."
echo ""
# Check if we have the backend URL
BACKEND_URL="https://linguabot-transcreation-backend.hf.space"
echo "π Testing backend connection..."
if curl -s "$BACKEND_URL/health" > /dev/null; then
echo "β
Backend is responding"
else
echo "β Backend is not responding. Please check your backend URL."
exit 1
fi
echo ""
echo "π To seed your deployed database, you need to:"
echo ""
echo "1. Go to your Hugging Face Space: https://huggingface.co/spaces/linguabot/transcreation-backend"
echo "2. Go to Settings β Repository secrets"
echo "3. Make sure you have MONGODB_URI set with your MongoDB Atlas connection string"
echo ""
echo "4. Then run this command in your backend Space's terminal:"
echo " npm run seed"
echo ""
echo "5. Or manually run:"
echo " node seed-data.js"
echo ""
echo "π This will create:"
echo " - Admin user: admin@example.com / admin123"
echo " - Student user: student@example.com / student123"
echo " - Tutorial tasks for Week 1"
echo " - Weekly practice tasks for all 6 weeks"
echo ""
echo "π After seeding, you can:"
echo " - Log in with the test accounts"
echo " - See tutorial tasks and weekly practice content"
echo " - Create submissions and test the voting system"
echo ""
echo "Would you like to proceed with the seeding instructions above?" |