UrlShortener is a simple URL shortening service written in Go (Golang). It provides functionality to shorten URLs, redirect to the original URL using the shortened version, and delete URLs from the database. This project was created primarily as a learning exercise to gain more experience with Golang.
- Shorten URLs: Generate a shortened version of any given URL.
- Redirect: Navigate to the original URL using the shortened link.
- Delete URLs: Remove URLs from the database.
- Frontend: Basic frontend built with HTMX and Go templates.
- Docker Support: Easily set up and run the application using Docker Compose.
- Unit Testing: Included small tests for the handlers.
- MongoDB: Utilizes MongoDB for storing URL data.
- Go: Backend logic and HTTP server using the standard library.
- HTMX: For frontend interactivity.
- Go Templates: For server-side rendering of HTML.
- MongoDB: Database for storing URLs.
- Docker: Containerization and orchestration using Docker Compose.
-
Clone the repository:
git clone https://github.com/yourusername/UrlShortener.git cd UrlShortener
-
Start the application using Docker Compose:
docker-compose up
-
The application should now be running at
http://localhost:8080
.
To stop the application, simply run:
docker-compose down