This is a RESTful API built using Golang, Fiber, Postgresql, RabbitMQ and Reflex. This API provides a simple implementation for scheduling jobs in Go.
Clone the repository to your local machine.
git clone https://github.com/dipo0x/url-shortenerEnsure that you have Golang, PostgreSQL and RabbitMQ installed on your machine. Alternatively, you can use their cloud service.
Navigate to the root directory of the project in a terminal.
cd url-shortenerRun the following command to install the necessary dependencies
go installAfter that, run this command to create a .env file with which you can get started.
bash build/scripts/setup.shAfter that, run this command to install migrate on your cmd so that you can create a migration for your models
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
Once the installation is successful, run this command to run the create table migration
make migrate-up
Run the following command to start the server and start up rabbitmq instance:
reflex -c .reflex
go run cmd/worker/main.goFor clarity sake, the first command spins up your development server while the second one spins up the RabbitMQ receiver. When you run the first command, you will see something similar to this:

When you run the second command, you will see something similar to this:
The server will run on http://localhost:8080 by default
To test the endpoints, run this command :
go test ./tests/If all your tests are successful, you will see this:

else, you will see something similar to this:
Base URL[dev]: 0.0.0.0:8080/\
When your server is running, call the base endpoint to ensure it is up, and you will receive a response like this:
You can find additional documentation for this API, including request and response signatures, by visiting https://documenter.getpostman.com/view/17975360/2sB2j999pk in your web browser.