Spaces:
Sleeping
Sleeping
| echo "π± Database Seeding Helper" | |
| echo "==========================" | |
| echo "" | |
| echo "This script will help you seed your deployed backend database." | |
| echo "" | |
| # Check if backend is responding | |
| 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. Upload the seed-database.js file to your backend Space" | |
| echo "5. Go to the Space's terminal and run:" | |
| echo " npm run seed" | |
| echo "" | |
| echo "5. Or if you prefer, you can run it directly:" | |
| echo " node seed-database.js" | |
| echo "" | |
| echo "π This will create:" | |
| echo " π€ Admin user: admin@example.com / admin123" | |
| echo " π€ Student user: student@example.com / student123" | |
| echo " π Tutorial tasks: 3 tasks for Week 1" | |
| echo " π Weekly practice: 6 tasks for Week 1" | |
| echo " π Practice examples: 4 examples" | |
| echo "" | |
| echo "π After seeding, you can:" | |
| echo " 1. Log in with admin@example.com / admin123" | |
| echo " 2. Log in with student@example.com / student123" | |
| echo " 3. View tutorial tasks and weekly practice" | |
| echo " 4. Create submissions and test the voting system" | |
| echo "" | |
| echo "β οΈ Note: Make sure your MONGODB_URI environment variable is set correctly in your Space settings." |