URL Shortener is a simple web application built using Flask, Python, and MongoDB. It allows users to create shortened URLs for long links, making them easier to share. The application is deployed and can be accessed at https://url-shortner-x6kn.onrender.com/.
- Shorten URLs: Create short aliases for long URLs.
- Redirect: Access the original long URL by using the generated short URL.
- Statistics: View the number of times a short URL has been accessed.
- Visit https://url-shortner-x6kn.onrender.com/.
- Enter the long URL you want to shorten.
- Receive the shortened URL.
- Share the shortened URL with others.
The URL Shortener is deployed and can be accessed at https://url-shortner-x6kn.onrender.com/.
- Flask: A lightweight web application framework in Python.
- MongoDB: A NoSQL database for storing URL mappings.
- Render: Deployment platform for hosting web applications.
Before running the application locally, make sure you have the following installed:
- Python: Download Python
- Flask: Install using
pip install Flask
- MongoDB: Download MongoDB
-
Clone the repository:
git clone https://github.com/sushil-2803/url-shortener.git
-
Navigate to the project directory:
cd url-shortener
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables:
-
Create a
.env
file in the root directory. -
Add the following variables:
MONGO_URI=your-mongodb-connection-uri
-
-
Run the application:
python app.py
-
Open your browser and visit
http://localhost:5000
to access the URL Shortener.
Contributions are welcome! If you'd like to contribute to the project, please follow the guidelines in the CONTRIBUTING.md file.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Enjoy shortening your URLs! 🚀