A simple URL Shortener application built with Node.js, Express.js, and JavaScript. This project allows users to convert long URLs into shorter, easy-to-share links.
- Shorten long URLs
- Generate unique short codes
- Redirect to the original URL
- Simple and beginner-friendly code
- REST API using Express.js
- Node.js
- Express.js
- JavaScript
- npm
URL-Shortener/
│── node_modules/
│── package.json
│── package-lock.json
│── server.js
- Clone the repository
git clone https://github.com/tirthraj01/URL-Shortener.git- Navigate into the project folder
cd URL-Shortener- Install dependencies
npm install- Start the server
node server.jsor (if using nodemon)
nodemon server.jsOnce the server is running, open your browser or API client and interact with the URL Shortener endpoints.
Example:
- Input:
https://www.example.com/very/long/url - Output:
http://localhost:3000/abc123
This project helps you understand:
- Express.js basics
- Routing
- Handling HTTP requests
- Generating random short IDs
- Backend project structure
- npm package management
- Store URLs in MongoDB
- User authentication
- Custom short URLs
- Click analytics
- URL expiration
- Copy-to-clipboard button
- Frontend with React
Tirthraj Chavan
- GitHub: https://github.com/tirthraj01
⭐ If you found this project helpful, consider giving it a star!