Skip to content

PriyanshLathigara/URL-Shortener

Repository files navigation

🔗 URL Shortener

A simple and secure URL shortener web application built using Node.js, Express, MongoDB, and EJS. It allows users to shorten long URLs, view analytics (click counts), and manage their shortened links via a user-friendly interface.


🚀 Features

  • 🔐 User authentication (Signup/Login)
  • 🔗 Shorten any long URL to a compact one
  • 📊 Analytics for each short link (click count)
  • 🧑 Dashboard to view and manage all your URLs
  • 💡 Built with security and clean design in mind

🛠️ Tech Stack

  • Backend: Node.js, Express
  • Frontend: EJS, HTML, CSS
  • Database: MongoDB
  • Authentication: Cookies + Custom JWT logic
  • Dev Tools: Nodemon, dotenv

⚙️ Getting Started (Local Setup)

🧾 1. Clone the Repo

git clone https://github.com/PriyanshLathigara/URL-Shortener.git
cd URL-Shortener

📦 2. Install Dependencies

npm install

🛡️ 3. Set Up Environment Variables

  • Create a .env file in the root folder:
PORT=8001
MONGO_URL=your_mongo_connection_string
secret=your_secret_key
  • ⚠️ Do not share your .env file publicly. For team projects, create a .env.example.

🔄 4. Run in Development Mode

npm run dev
  • Now open your browser at: http://localhost:8001
  • ✅ All set! Your app is up and running locally.
  • And All set, Done & Dusted.

About

LinkSlice : A URL shortener

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors