Building and using a service layer with Redis
Building a Layer that returns a service? I see things like
I see
So my idea is to use
I'm just not sure what the method to use is. I can do
Layer.effect, my idea is I have two libraries i've wrapped in Effect. I want to build a layer that does some of the service "setup". Then use this service inside of another Layer.I see
Layer.effect but it takes a tag? which i'm not entirely sure on. My psuedo code looks like soSo my idea is to use
Redis.Live in say my Express service to setup middleware.I'm just not sure what the method to use is. I can do
succeed but initially that feels wrong as what if the redis connection fails? Or is layer creation above the implementation of the service? So suceed is correct, and the failure to connect isn't really a Layer issue, just an error in code to handle?