A sleek, minimal random quote generator with React frontend and Express backend.
- Fetches quotes from external API
- Displays them on a clean UI
- With a click or refresh new quote is generated
quote-generator/
├── frontend/
│ ├── src/
│ │ └── QuoteBox.js
│ └── package.json
├── backend/
│ ├── server.js
│ └── package.json
└── README.md
- Node.js (v14 or higher)
- npm
-
Clone the repository
git clone https://github.com/Vasita27/random-quote-generator.git cd random-quote-generator
-
Setup Backend
cd backend npm install npm start
Server runs on
http://localhost:5000
-
Setup Frontend
cd frontend npm install npm run dev
App runs on
http://localhost:5173
- Start the backend server first
- Start the frontend
- Click "Get New Quote" to fetch random quotes
Backend:
- express
- axios
- cors
Frontend:
- react
- axios
GET /api/quotes/random
- Returns a random quote with text and author