A functional Scala stack for 2020
summary
A small backend is built: a POST /like API that inserts a language and a like into Postgres in one transaction, using doobie ConnectionIO for composable SQL descriptions and an upsert with conflict on languages_name_key to avoid duplicates. The endpoint is declared as a value with tapir -> http4s routes, interpreted to run via a Transactor and monix/IO, and the same endpoint generates Swagger/OpenAPI UI that is served; the live demo returns 200 and shows DB rows added as expected.
AI-written summary · about
