Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hexagontk/todo_backend

Sample application for the Todo-Backend project (http://www.todobackend.com) which implements TodoMVC (http://todomvc.com) backends.
https://github.com/hexagontk/todo_backend

example gradle hacktoberfest jvm kotlin

Last synced: 2 months ago
JSON representation

Sample application for the Todo-Backend project (http://www.todobackend.com) which implements TodoMVC (http://todomvc.com) backends.

Awesome Lists containing this project

README

        

# Todo
Todo backend example for [Todo Backend](http://www.todobackend.com/index.html) 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
```bash
./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.