Closed girdharshubham closed 2 years ago
If I have some time I’d be interested in picking this up :)
@brbrown25 are you still on to this?
@brbrown25 are you still on to this?
I didn't get a chance to, so feel free to pick it up. Otherwise I'll have some time this week to hack on it.
@tusharmath I'm gonna start working on this today and hope to have a PR by EOW, depending on schedule. I'm think this is a change that would need to be added to the example project?
Available in 1.0.0.0-RC18
Description
Twirl is a powerful Scala-based template engine. We'd need a document and an example demonstrating integration of zio-http with twirl.
Example
import play.twirl.api. import zhttp.http. import zhttp.service.Server import zio.{ExitCode, URIO}
object ZIOHttp extends zio.App { val app: HttpApp[Any, Nothing] = HttpApp.collect { case Method.GET -> Root => { val response: UResponse = Response .text(html .index("John Doe", 42) .toString() )
}
override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = Server.start(80, app).exitCode
}
Specs