You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

32 lines
1003 B

package nova.monadic_sfx
import _root_.monix.bio.BIOApp
import _root_.monix.bio.Task
import _root_.monix.bio.UIO
import cats.effect.ExitCode
import cats.effect.Resource
import com.softwaremill.macwire._
import io.odin._
import nova.monadic_sfx.executors._
// import nova.monadic_sfx.util.IOUtils._
// import sttp.client.httpclient.monix.HttpClientMonixBackend
object Main extends MainModule with BIOApp {
def appResource(startTime: Long) =
for {
implicit0(logger: Logger[Task]) <- makeLogger
schedulers = new Schedulers()
// backend <- Resource.make(
// toIO(HttpClientMonixBackend()(schedulers.async))
// )(c => toIO(c.close()))
// actorSystem <- actorSystemResource(logger)
_ <- Resource.liftF(wire[MainApp].program)
} yield ()
override def run(args: List[String]): UIO[ExitCode] =
appResource(System.currentTimeMillis())
.use(_ => Task.unit)
.onErrorHandleWith(ex => UIO(ex.printStackTrace()))
.as(ExitCode.Success)
}