Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/your-username/ipl-teams-website.git
-
Run the frontend:
cd frontend && npm run dev
-
Run the backend:
cd backend && npm run server
Make sure to add the following environment variables in your .env file in the frontend directory:
PORT=4000
MONGODB_URI=<your_mongodb_connection_string>
JWT_SECRET=<your_jwt_secret_key>
STRIPE_SECRET_KEY=<your_stripe_secret_key>
CURRENCY='usd'
DELIVERY_CHARGE=10Add the following environment variables in your .env file in the backend directory:
PORT=4000
MONGODB_URI=<your_mongodb_connection_string>
JWT_SECRET=<your_jwt_secret_key>
STRIPE_SECRET_KEY=<your_stripe_secret_key>
CURRENCY='usd'
DELIVERY_CHARGE=10The team assignment logic randomly assigns an IPL team from a predefined list of teams:
const teams = ['Mumbai Indians', 'Chennai Super Kings', 'Royal Challengers Bangalore', 'Delhi Capitals', 'Kolkata Knight Riders', 'Punjab Kings', 'Rajasthan Royals', 'Sunrisers Hyderabad'];
const iplTeam = teams[Math.floor(Math.random() * teams.length)];You can access the live version of the website at the following URL: