https://github.com/fancellu/http4s-db-example
http4s + H2 + Doobie + Quill + flywaydb + Cats Effect example
https://github.com/fancellu/http4s-db-example
cats-effect doobie flywaydb h2-database http4s quill
Last synced: 5 months ago
JSON representation
http4s + H2 + Doobie + Quill + flywaydb + Cats Effect example
- Host: GitHub
- URL: https://github.com/fancellu/http4s-db-example
- Owner: fancellu
- Created: 2020-04-16T22:06:16.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T16:53:47.000Z (over 2 years ago)
- Last Synced: 2025-04-03T16:52:11.702Z (6 months ago)
- Topics: cats-effect, doobie, flywaydb, h2-database, http4s, quill
- Language: Scala
- Homepage:
- Size: 14.6 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# http4s-db-example
http4s + H2 + Doobie + Quill + flywaydb + Cats Effect
## To run
Either run `MyMain` or `sbt run`
It should be on localhost:8080
## DB
3 tables: video, tags, and a videotag join table
## Video Endpoints
GET http://localhost:8080/video
Show all videos
GET http://localhost:8080/video/1
Show certain video
GET http://localhost:8080/video/tags/1
Show tags for certain video
POST http://localhost:8080/video/tags/[id]?tags=1,2,3
Set tags for certain video
POST http://localhost:8080/video/[name]
Create a new video
## Tag Endpoints
GET http://localhost:8080/tag
Show all tags
GET http://localhost:8080/tag/1
Show certain tag
POST http://localhost:8080/tag/[name]
Create a new tag
## VideoTag Endpoints
GET http://localhost:8080/videotag
Show all videotags
GET http://localhost:8080/videotag/1
Show certain videotag
POST http://localhost:8080/videotag/[videoid]/[tagid]
Create a new videotag (may well be easier to use the batch POST /video/tags/[id]?tags=1,2,3 call)