PingIt is a URL shortener service that provides both a command-line interface (CLI) and a web API, written in Go. This project is designed to offer a simple and efficient way to shorten URLs directly from your terminal or through HTTP requests.
- CLI for URL Shortening: Easily shorten URLs from the command line.
- Web API: Integrate URL shortening into your applications with our HTTP API.
- Docker Support: Run PingIt in a containerized environment with Docker support.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Go
- Docker
- Task
Clone the repository to your local machine:
git clone https://github.com/deepraj02/pingit.git
cd pingit
To start the API containers, you can use the Task command. This will build and run the API service along with its dependencies, such as the database service, in Docker containers.
task api-run
This command is defined in the Taskfile.yml and will execute the necessary Docker commands to get your API service up and running.
To build the CLI application, you can use the following Task command:
task build-cli
This command compiles the CLI application and places the executable in the cli/bin
directory. The build process is defined in the Taskfile.yml
file.
After building the CLI, you can run it using the following Task command:
task run-cli
This command executes the CLI application, allowing you to interact with the PingIt service from your command line. The specifics of this command are also detailed in the Taskfile.yml file.