Building REST APIs quickly using PostgREST

Eric Anicet
4 min readOct 31, 2022

Welcome. We’re going to implement a sample REST API quickly using PostgREST.

Prerequisites

This is the list of all the prerequisites:

Overview

What is PostgREST?

PostgREST is a standalone web server that turns your PostgreSQL database directly into a RESTful API. The structural constraints and permissions in the database determine the API endpoints and operations. CRUD endpoints (create, read, update and delete) no longer need to be manually created, which reduces the complexity of backend systems.

https://postgrest.org/en/stable/index.html
https://postgrest.org/en/stable/index.html

Setup PostgREST with Docker

There are several ways to install PostgREST (Binary OS source, Docker, and docker-compose, Deploying to Heroku). We’ll use Docker containers. We will create a docker-compose YAML file containing all the instructions to run the services PostgreSQL database, PostgREST, and Swagger OpenAPI.

--

--