---
title: "Discussion on \"Building a RESTful API in Go with Gin and PostgreSQL\" | Hashnode"
description: "Discussion on \"Building a RESTful API in Go with Gin and PostgreSQL\". In this tutorial, we'll build a real-world RESTful API using the Gin web framework in Go, connected to a PostgreSQL database. We'll structure our application by separating models and services, following best practices to create maintainable and scala..."
url: "https://hashnode.com/posts/building-a-restful-api-in-go-with-gin-and-postgresql/672ceab461430cb9fec3c9eb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Building a RESTful API in Go with Gin and PostgreSQL](https://opyjo.hashnode.dev/building-a-restful-api-in-go-with-gin-and-postgresql?utm_source=hashnode&utm_medium=feed)

In this tutorial, we'll build a real-world RESTful API using the Gin web framework in Go, connected to a PostgreSQL database. We'll structure our application by separating models and services, following best practices to create maintainable and scala...

Nov 7, 2024 · 6 min read · opyjo.hashnode.dev  
Updated Nov 11, 2024  
Read the article

-   [#golang](https://hashnode.com/tag/golang)
-   [#golang-developer](https://hashnode.com/tag/golang-developer)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#devops](https://hashnode.com/tag/devops)
-   [#apis](https://hashnode.com/tag/apis)
-   [#rest-api](https://hashnode.com/tag/rest-api)
-   [#restful-apis](https://hashnode.com/tag/restful-apis)

## Written by

[Johnson Ojo](https://hashnode.com/@opyjo)

@opyjo · Ontario, Canada

  
[View profile](https://hashnode.com/@opyjo)

From Balancing Sheets to Coding Sheets: My Journey as a Chartered Accountant Turned Software Engineer. Daily Doses of Tech Learning

"Hello! I'm a passionate Software Engineer dedicated to the ever-evolving world of technology. With a deep love for coding and a commitment to continuous learning, I've found my true calling in the realm of software development. Each day is a new adventure as I explore the latest trends, techniques, and technologies in the tech industry. My blog, 'Pondering Programmer', is a reflection of my journey: a mix of insights, discoveries, and practical tips from the front lines of coding. Whether you're a fellow tech enthusiast, a budding developer, or just curious about the digital world, join me as I unravel the mysteries of code and share my daily learnings in this fascinating and dynamic field. Let's embark on this tech adventure together, learning, growing, and coding our way to new possibilities!"

## Responses 1

Markdown supported · ⌘↵ to post

[maggie](https://hashnode.com/@cool663)

[Jan 1, 2025](https://hashnode.com/posts/building-a-restful-api-in-go-with-gin-and-postgresql/672ceab461430cb9fec3c9eb/comment/6774bbe2e87e8dd3c248d835)

I really enjoy reading your blog posts on API testing. EchoAPI has been a game-changer for testing RESTful endpoints by letting me create mock responses, making it possible to work on the front end even before the backend is fully ready.
