Getting Started

Endpoints

Post a single Person

Method: Post localhost:8080/api/v1/person

{
    "name": "Nelson Mandela"
}

Get all people posted

Method: get localhost:8080/api/person

result

[
    {
        "id": "da8d2adc-1a61-4910-8d12-1d5d1a44fff7",
        "name": "John Hammond"
    },
    {
        "id": "223bc3d2-687b-4ffe-a2b6-148669901104",
        "name": "Nelso Mandela"
    },
    {
        "id": "69b821d0-8777-4214-8f8e-a5f4dfc17755",
        "name": "Anna Brenda "
    }
]

Docker Postgres

create an image

docker run --name postgresdb -e POSTGRES_PASSWORD=password -d -p 5432:5432 postgres:alpine

Display ports

docker port dockerimageid/name

Show currently running images

docker ps

To bash into the container

docker exec -it dockerimageid bin/bash

run postgresql

psql

psql -U password
#list all databases
\l 
# Enter into  a db
\c databases
# Show all relationships
\d
# Describe a database/Relationships
\dt
# Enter into a table
\d person
#

Reference Documentation

For further reference, please consider the following sections:

Guides

The following guides illustrate how to use some features concretely: