Skip to content

A clean and modular URL Shortener built with Node.js + Express.js using EJS templating, routes/controllers structure, and JSON file-based storage. Users can enter a long URL and custom short code, view all links on the page, and access original URLs via short links.

Notifications You must be signed in to change notification settings

DeveloperZeeshu/URL-Shortener

Repository files navigation

🔗 Express URL Shortener with EJS, Routes & Controllers, MongoDB

A full-stack URL shortener built with Node.js, Express.js, and MongoDB.

Users can shorten long URLs by entering a custom or random short code. The shortened links are stored in a MongoDB collection and displayed on the home page using EJS templates.


🚀 Features

  • Built with Express.js using clean routes/controllers
  • View engine: EJS
  • Stores links in MongoDB
  • User inputs:
    • Long URL
    • Custom short code (e.g., ythttps://youtube.com)
  • Homepage shows all shortened links
  • Clicking a short link redirects to the original
  • Custom 404 page for invalid short codes

▶️ Getting Started

1. Clone the repository

git clone https://github.com/DeveloperZeeshu/URL-Shortener.git
cd url-shortener-node

🙋‍♂️ Author

Made with ❤️ by Jeesan Abbas

About

A clean and modular URL Shortener built with Node.js + Express.js using EJS templating, routes/controllers structure, and JSON file-based storage. Users can enter a long URL and custom short code, view all links on the page, and access original URLs via short links.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published