Skip to content

Latest commit

 

History

History
94 lines (76 loc) · 1.19 KB

README.md

File metadata and controls

94 lines (76 loc) · 1.19 KB

Todo

Todo backend example for Todo Backend using Hexagon.

The spec is:

GET /tasks/{id}

Response:

{
    "url": "/tasks/{id}",
    "title": string,
    "order": int?,
    "completed": boolean
}

GET /tasks

Response:

[
    {
        "url": "/tasks/{id}",
        "title": string,
        "order": int?,
        "completed": boolean
    },
    ...
}

POST /tasks

Request:

{
  "title": string,
  "order": int?
}

Response:

{
    "url": "/tasks/{id}",
    "title": string
    "order": int?,
    "completed": boolean
}

PATCH /tasks/{id}

Request:

{
  "title": string?,
  "order": int?
  "completed": boolean?
}

Response:

{
    "url": "/tasks/{id}",
    "title": string
    "order": int?,
    "completed": boolean
}

DELETE /tasks/{id}

Response: 200 OK

DELETE /tasks

Response: 200 OK

Build

./gradlew build jpackage
docker compose --profile local build
# Or
REGISTRY="k3d.localhost:5000/" docker compose --profile local build

Deploy

Set the environment variable SERVICE_URL to whatever your host is to generate the correct url for tasks.

Set MONGODB_URL to the url for your MongoDb database.