Run the React frontend and Express backend together. The backend proxies requests to the Gemini API. All code is JavaScript.
- Node.js 18+
-
Create the environment file for the backend:
- Create
server/.envwith:GEMINI_API_KEY=your_api_key_here PORT=5000
- Create
-
Install dependencies for both apps:
npm run install-all
-
Start both servers (concurrently):
npm run dev
Frontend: http://localhost:5173
Backend: http://localhost:5000
- The frontend calls the backend route
POST /api/geminiwith{ prompt }. - The backend uses
axiosto call the Gemini API and returns JSON like{ text, raw }. - Tailwind CSS is configured in the
client/folder with Vite.
