Go-fiber URL Shortener API Development

Oladipo

Oladipo Adesiyan

Go-fiber URL shortener

Introduction

This is a RESTful API built using Golang, Fiber, Postgresql, RabbitMQ, Async and Reflex. This API provides a simple implementation to scheduling jobs in golang.

Setup

Clone the repository to your local machine.
git clone https://github.com/dipo0x/url-shortener
Ensure 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-shortener
Run the following command to install the necessary dependencies
go install
After that, run this command to create a .env file with which you can get started with.
bash build/scripts/setup.sh

Running Server

Locally
Run the following command to start the server and start up rabbitmq instance:
reflex -c .reflex
go run cmd/worker/main.go
The server will run on http://localhost:8080 by default

Test

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:

Available Endpoints

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:

Conclusion

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.
Like this project

Posted Oct 1, 2025

Developed a RESTful API using Golang, Fiber, and RabbitMQ for job scheduling.