Pixel-perfect URL trimming with copy-ready short links and instant QR codes. Built with Express, EJS, MongoDB, and shortid.
- Shorten URLs with unique short codes (duplicates return the existing short link)
- Auto-generated QR codes for each shortened link
- Copy-to-clipboard helper for the generated short URL
- Simple Bootstrap UI served from the same Express app
- Node.js 18+
- MongoDB instance (local or hosted)
- Install dependencies
npm install
- Create a
.envfile in the project root:PORT=3000 MONGODB=mongodb://localhost:27017/pixcut
- Run the server in dev mode
npm run dev
- Open http://localhost:3000 and shorten a URL.
POST /shortUrls- Body:
{ "fullUrl": "https://example.com" } - Success:
{ "full": "https://example.com", "short": "AbCdEf" }
- Body:
GET /:short- Redirects to the full URL for the provided short code
Urldocumentfull(string, required, unique)short(string, generated via shortid, required)
npm run dev— start the server with nodemon
- Static assets live in
public/; the main view isviews/index.ejs. - QR codes are generated client-side via the qrserver.com API.