URL-SNIPPER is a URL shortener project built with Python, Django, and MySQL.
- Shorten long URLs to a shorter, more manageable format.
- Redirect users to the original URL when they visit the shortened URL.
- Track the number of clicks and other analytics for each shortened URL.
-
Clone the repository:
git clone https://github.com/your-username/url-snipper.git
-
Create a virtual environment:
python3 -m venv env
-
Activate the virtual environment:
-
For Windows:
.\env\Scripts\activate
-
For macOS/Linux:
source env/bin/activate
-
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the database:
- Create a MySQL database and update the database settings in
url_snipper/settings.py
.
- Create a MySQL database and update the database settings in
-
Apply database migrations:
python manage.py migrate
-
Start the development server:
python manage.py runserver
-
Open your browser and visit
http://localhost:8000
to access the URL-SNIPPER application.
- To shorten a URL, enter the long URL in the input field on the homepage and click the "Shorten" button.
- The shortened URL will be displayed on the page. Users can copy and share this URL.
- When a user visits the shortened URL, they will be redirected to the original URL.