https://rd9437.pythonanywhere.com/
This is a simple URL shortener web application built using Flask. It allows users to shorten long URLs into shorter, more manageable ones.
- Shorten long URLs into short, easy-to-share links.
- Redirect users to the original long URL when they visit the shortened link.
- Minimalistic user interface for easy use.
To run this web application locally, follow these steps:
- Clone this repository to your local machine:
git clone https://github.com/rd9437/url-shortener.git
- Navigate to the project directory:
cd url-shortener
- Install the required dependencies using pip:
pip install -r requirements.txt
- Run the Flask application:
Open your web browser and visit http://localhost:5000 to access the web application.
python app.py
The source code for this project is organized as follows:
- app.py: Contains the main Flask application code, including route definitions and URL handling logic.
- templates/: Directory containing HTML templates used by the Flask application for rendering web pages.
- static/: Directory containing static files such as CSS stylesheets, JavaScript files, and images.
- confetti.js: JavaScript file responsible for triggering the confetti animation on the shorten.html page.
- styles.css: CSS stylesheet defining the styles for the HTML templates.
- Flask: A micro web framework for Python used to build the web application.
- canvas-confetti: JavaScript library for creating confetti animations.
- The Flask application (
app.py
) handles incoming HTTP requests and serves HTML templates located in thetemplates
directory. - When a user submits a URL through the form on the landing page (
index.html
), the Flask application generates a shortened URL and renders theshorten.html
page with the shortened URL. - The confetti animation on the
shorten.html
page is triggered by theconfetti.js
JavaScript file when the page loads. - Users can click on the "Shorten Another Link" button to return to the landing page and shorten another URL.
If you encounter any issues or have questions regarding the Resume Builder, please don't hesitate to reach out to me for assistance.