first commit
This commit is contained in:
101
SEED_NOW.md
Normal file
101
SEED_NOW.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# 🌱 SEED THE DATABASE NOW!
|
||||
|
||||
## Quick Commands
|
||||
|
||||
```bash
|
||||
# 1. Make sure MongoDB is running
|
||||
mongod
|
||||
|
||||
# 2. In another terminal, seed the database
|
||||
cd TurboTrades
|
||||
npm run seed
|
||||
```
|
||||
|
||||
## What You'll Get
|
||||
|
||||
✅ **24+ marketplace items** (CS2 & Rust skins)
|
||||
✅ **Featured items** for homepage
|
||||
✅ **Admin user** (seller for all items)
|
||||
✅ **Price range** from $12.99 to $8,999.99
|
||||
✅ **Real images** from Steam CDN
|
||||
|
||||
## Then Start Everything
|
||||
|
||||
```bash
|
||||
# Terminal 1: Backend
|
||||
cd TurboTrades
|
||||
npm run dev
|
||||
|
||||
# Terminal 2: Frontend
|
||||
cd TurboTrades/frontend
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## View in Browser
|
||||
|
||||
Open: `http://localhost:5173`
|
||||
|
||||
You should see:
|
||||
- ✅ Featured items on homepage
|
||||
- ✅ Full marketplace at `/market`
|
||||
- ✅ Working search & filters
|
||||
- ✅ Item details pages
|
||||
|
||||
## Sample Items Include
|
||||
|
||||
**High Value:**
|
||||
- AWP | Dragon Lore ($8,999.99)
|
||||
- M4A4 | Howl ($2,499.99)
|
||||
- Karambit | Fade ($1,899.99)
|
||||
- Butterfly Knife | Doppler ($1,599.99)
|
||||
|
||||
**Mid Range:**
|
||||
- Desert Eagle | Blaze ($499.99)
|
||||
- Glock-18 | Fade ($299.99)
|
||||
- AWP | Asiimov ($54.99)
|
||||
|
||||
**Affordable:**
|
||||
- AK-47 | Neon Rider ($29.99)
|
||||
- P250 | Asiimov ($24.99)
|
||||
- MAC-10 | Neon Rider ($12.99)
|
||||
|
||||
## Verify It Worked
|
||||
|
||||
```bash
|
||||
# Check MongoDB
|
||||
mongosh
|
||||
use turbotrades
|
||||
db.items.countDocuments() # Should show 24+
|
||||
exit
|
||||
|
||||
# Check API
|
||||
curl http://localhost:3000/market/items
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**MongoDB not connecting?**
|
||||
```bash
|
||||
# Start MongoDB first
|
||||
mongod
|
||||
```
|
||||
|
||||
**Items not showing in frontend?**
|
||||
1. Check backend is running: `http://localhost:3000/health`
|
||||
2. Check browser console for errors
|
||||
3. Restart both servers
|
||||
|
||||
**Want to re-seed?**
|
||||
```bash
|
||||
# Safe to run multiple times - clears old data first
|
||||
npm run seed
|
||||
```
|
||||
|
||||
## That's It!
|
||||
|
||||
Your marketplace is now fully populated with data! 🎉
|
||||
|
||||
**Documentation:**
|
||||
- Full seeding guide: `SEEDING.md`
|
||||
- Item model: `models/Item.js`
|
||||
- Seed script: `seed.js`
|
||||
Reference in New Issue
Block a user