Shorten URLs using Bitly with a simple React frontend and Node.js backend.
- Install dependencies:
npm install
- Add your Bitly token to
backend/.env:BITLY_TOKEN=your_bitly_token_here PORT=5000 - Start both servers:
npm start
- Frontend: http://localhost:5173 Backend: http://localhost:5000
- POST
/api/shorten- Request:
{ "long_url": "https://example.com" } - Response: Bitly short link or error
- Request:
- Keep your Bitly token secret
- Change Bitly domain in backend if needed
ISC