-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZIO Module example app with error handling #90
Comments
Meanwhile, I have a dummy ZIO project with a magnum aboard. |
@lvitaly Nice! Thanks Some minor comments: object BookRepository:
val layer: URLayer[Transactor, BookRepository] =
ZLayer {
ZIO.serviceWith[Transactor](BookRepositoryLive(_))
} can be simplified with: object BookRepository:
val layer: URLayer[Transactor, BookRepository] = ZLayer.derived[BookRepositoryLive]
🙂 |
@guizmaii, thanks! I knew there should be a simpler way to create such layers. By the way, guys, if you have something particular in mind as an example, I would love to help you with it. |
@lvitaly I think the missing example is a transaction in which the code throws an exception to revert it. |
Hey, probably you know, but... The readme file and the presentation declare a ZIO module as Readme: "com.augustnagro" %% "magnum-zio" % "x.x.x" mvnrepository: "com.augustnagro" %% "magnumzio" % "2.0.0-M1" |
Great work, thanks for taking this on @lvitaly . I'm happy to merge as-is, and we can create issues & iteratively enhance from there. |
One thought I have (that we can address later) is that the example app be as realistic as possible. Since TestContainers should only be used for tests, it makes sense to strip that out and use an actual dockerfile with PG. Going even further, I would like to see this become a g8 template that includes ZIO HTTP as well. I created https://github.com/AugustNagro/magnum-zio-http.g8 (empty g8 template) |
No description provided.
The text was updated successfully, but these errors were encountered: