This is a simple URL shortener API built using Express, MongoDB, and DNS lookup. It allows you to shorten long URLs and retrieve the original URL using a shortened version.
- POST /api/shorturl — Accepts a URL and returns a shortened URL.
- GET /api/shorturl/:shortUrl — Redirects to the original URL using the shortened URL.
- Node.js
- MongoDB (for storing original and shortened URLs)
git clone https://github.com/your-username/url-shortener.git
cd url-shortener