3.1 KiB
3.1 KiB
๐ ONE-COMMAND STARTUP
โก FASTEST WAY TO RUN BETFUN ARENA
Single Command (RECOMMENDED):
cd /Users/arhansubasi/betfun-arena/betfun-arena && npm run dev
That's it! This will start all 4 services in one terminal with color-coded output.
๐ WHAT YOU'LL SEE
The command will start all services with colored prefixes:
[WEB] โถ Next.js starting on port 3000...
[API] โถ Express API starting on port 3001...
[WS] โถ WebSocket server starting on port 3002...
[INDEX] โถ Solana indexer starting...
๐ SERVICES RUNNING
| Service | Port | URL |
|---|---|---|
| Frontend | 3000 | http://localhost:3000 |
| API | 3001 | http://localhost:3001 |
| WebSocket | 3002 | http://localhost:3002 |
| Indexer | - | Background |
๐ฏ WHAT TO DO NEXT
- Wait for all services to start (usually 10-30 seconds)
- Open your browser: http://localhost:3000
- Explore all pages:
- Markets: http://localhost:3000/markets
- Trading: http://localhost:3000/arena/[id]/trade
- Portfolio: http://localhost:3000/portfolio
- Analytics: http://localhost:3000/analytics
- And 11 more pages!
๐ TO STOP ALL SERVICES
Press Ctrl+C in the terminal where you ran npm run dev.
This will automatically kill all 4 services at once.
๐ ALTERNATIVE COMMANDS
Production Build:
npm run build
npm run start:all
Individual Services:
npm run dev:web # Frontend only
npm run dev:api # API only
npm run dev:ws # WebSocket only
npm run dev:indexer # Indexer only
๐ TROUBLESHOOTING
Port Already in Use:
# Find and kill processes
lsof -i :3000,3001,3002
kill -9 <PID>
Module Not Found:
# Reinstall dependencies
npm install
cd apps/web && npm install
cd ../.. && npm run dev
Clear Everything:
# Clean and reinstall
npm run clean
npm install
npm run dev
โจ FEATURES
When running, you get:
- โ Hot reload on code changes
- โ Color-coded console output
- โ All services in one terminal
- โ Auto-restart on crashes
- โ Ctrl+C kills everything
๐ PROJECT STRUCTURE
betfun-arena/
โโโ apps/
โ โโโ web/ โ Frontend (Port 3000)
โโโ packages/
โ โโโ api/ โ REST API (Port 3001)
โ โโโ websocket/ โ WebSocket (Port 3002)
โ โโโ indexer/ โ Blockchain Indexer
โ โโโ anchor/ โ Smart Contracts
โ โโโ sdk/ โ TypeScript SDK
โโโ package.json โ Root scripts
๐ YOU'RE READY!
Just run:
npm run dev
And visit http://localhost:3000 ๐โ๏ธ๐
๐ก PRO TIPS
- Keep this terminal open - all logs appear here
- Watch for errors - color-coded by service
- Auto-reload works - save files to see changes
- One Ctrl+C stops all - clean shutdown
Status: ๐ข All Services Configured
Command: npm run dev
URL: http://localhost:3000
Happy Coding! ๐ฏ