A Drudge Report-style news aggregator using Polymarket prediction markets as content curation signals.
Problem: Polymarket's API doesn't include CORS headers, blocking direct browser requests.
Solution: Added a Vercel Serverless Function (api/markets.js) that proxies API requests server-side, bypassing browser CORS restrictions.
├── index.html # Main page (Drudge-style layout)
├── api/
│ └── markets.js # Vercel serverless function (API proxy)
├── vercel.json # Vercel configuration
└── README.md # This file
- Browser loads
index.html - JavaScript fetches from
/api/markets(our proxy) - Vercel serverless function fetches from Polymarket (no CORS issue)
- Data flows back to browser
- Markets are ranked by weighted algorithm (price change + volume + trades)
- Display in Drudge-style three-column layout
# Install Vercel CLI globally (optional)
npm install -g vercel
# Deploy from project directory
vercel --prod- Push this project to GitHub
- Go to vercel.com/dashboard
- Click "New Project"
- Import your GitHub repository
- Deploy (Vercel auto-detects the configuration)
- Go to vercel.com/dashboard
- Drag the entire project folder into Vercel
- Deploy
To test locally with Vercel dev server:
npx vercel devThen open http://localhost:3000
Edit these values in index.html (around line 143):
const RANKING_WEIGHTS = {
priceChange: 0.60, // 60% weight on 24hr price movement
volume: 0.30, // 30% weight on trading volume
tradeCount: 0.10 // 10% weight on number of trades
};const TOTAL_MARKETS = 28; // 1 main + 27 in columns
const RED_HEADLINE_COUNT = 7; // Top N markets show in red"Error loading markets" message:
- Make sure you've deployed to Vercel (not opening index.html locally)
- The
/api/marketsendpoint only works when deployed to Vercel - Local file:// protocol won't work - you need a server
Markets not ranking correctly:
- Adjust
RANKING_WEIGHTSin index.html - Check browser console for debugging info
- Weights must sum to any value (typically 1.0)
- Deploy to Vercel ✅
- Test in production
- Tune ranking weights based on results
- Add news article matching (Phase 2)