I created this project as part of my practice journey to learn Node.js, JavaScript, and web development fundamentals. It's a simple and effective URL shortening service where users can generate custom short links for long URLs.
- 🔗 Shorten long URLs into custom short codes.
- 🖥️ Easy-to-use web interface.
- 📜 Keeps track of all shortened links.
- 🛠️ Built with vanilla HTML, CSS, and JavaScript for frontend.
- ⚡ Backend powered by Node.js.
Here is a screenshot of the main interface:
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js
- File Storage: JSON
📦 url-shortener ├── 📂 data │ └── links.json # Stores shortened URLs ├── 📂 public │ ├── index.html # Main UI │ ├── style.css # Styling ├── app.mjs # Backend logic ├── package.json # Node.js dependencies └── README.md # Project documentation
git clone https://github.com/your-username/url-shortener.git
cd url-shortener
2️⃣ Install Dependencies
Ensure you have Node.js installed. Then run:
npm install
3️⃣ Start the Server
node app.mjs
4️⃣ Access the Application
http://localhost:3002
✨ How It Works
Enter a long URL in the input field.
Provide a custom short code or let the app generate one for you.
Submit the form to generate a short URL.
Access the original URL by clicking the generated short link.
Screenshots
