Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/hexagontk/todo_backend
- Owner: hexagontk
- Created: 2017-12-16T19:59:11.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-09-18T06:00:34.000Z (5 months ago)
- Last Synced: 2024-09-18T08:25:34.377Z (5 months ago)
- Topics: example, gradle, hacktoberfest, jvm, kotlin
- Language: Kotlin
- Homepage: https://hexagontk.com
- Size: 420 KB
- Stars: 8
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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.