sidnt / zionotes

⸮ 🔴zio notes | zio nursery 🔵?
0 stars 0 forks source link

zio app trait #18

Open sidnt opened 4 years ago

sidnt commented 4 years ago

we can run our zio app by implementing the run method in the zio.App trait, like:

object Main extends App {
  override def run(args: List[String]): ZIO[zio.ZEnv, Nothing, Int] = putStrLn("hi").as(0) //nonZ exit code
}