basic url shortener using go, postgres and redis.
This project consists of three microservices: id-service
, redirection-service
, and short-service
.
This service is responsible for generating unique IDs. The main entry point is main.go
in the cmd/server
directory. The ID generation logic is implemented in handler.go
in the pkg/api/ids
directory.
This service handles redirection from short URLs to their original URLs. The main entry point is main.go
in the cmd/server
directory. The redirection logic is implemented in handler.go
in the pkg/api/links
directory.
This service creates short URLs. The main entry point is main.go
in the cmd/server
directory. The short URL creation logic is implemented in handler.go
in the pkg/api/links
directory. The database schema is defined in init.sql
in the pkg/db
directory.
To get started, clone the repository and install the dependencies for each service. Then, you can run each service locally.
Contributions are welcome. Please open an issue or submit a pull request.
This project is licensed under the MIT License.