A simple Node.js and Express-based URL shortener web app. Users can shorten long URLs, use custom aliases, track click counts, and export all data as CSV.
- Shorten long URLs with auto-generated or custom aliases
- Redirects and tracks click counts for each short URL
- Export all URL data as CSV
- Simple web interface with modern styling
- Node.js (v14 or newer recommended)
- Clone or download this repository.
- Install dependencies:
npm install
- Start the server:
node server.js
- Open your browser and go to http://localhost:3000
url-shortener/
├── package.json
├── server.js
├── urls.json # Stores URL data
└── public/
├── index.html # Main web page
└── styles.css # CSS styling
- Enter a long URL and (optionally) a custom alias, then click "Shorten".
- Use the generated short URL to redirect to the original.
- Click "Export CSV" to download all URL data.
- express
- body-parser
- shortid
- cors