Building REST APIs quickly using PostgREST
Welcome. We’re going to implement a sample REST API quickly using PostgREST.
Prerequisites
This is the list of all the prerequisites:
- Docker installed
- Docker compose is installed
- Postman / insomnia or any other API testing tool.
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.
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.