File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
frameworks/Scala/zio-http Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11name := " zio-http"
22version := " 1.0.0"
3- scalaVersion := " 2.13.6 "
3+ scalaVersion := " 2.13.14 "
44lazy val root = (project in file(" ." ))
55 .settings(
66 libraryDependencies += " dev.zio" %% " zio-http" % " 3.0.0-RC10" ,
Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ import zio._
22import zio .http ._
33import zio .http .netty .NettyConfig
44import zio .http .netty .NettyConfig .LeakDetectionLevel
5+ import java .lang .{Runtime => JRuntime }
56
67object Main extends ZIOAppDefault {
78
89 private val plainTextMessage : String = " hello, world!"
910 private val jsonMessage : String = """ {"message": "hello, world!"}"""
1011
1112 private val STATIC_SERVER_NAME = " zio-http"
12- private val NUM_PROCESSORS = Runtime .getRuntime.availableProcessors()
13+ private val NUM_PROCESSORS = JRuntime .getRuntime.availableProcessors()
1314
1415 val app : Routes [Any , Response ] = Routes (
1516 Method .GET / " /plaintext" ->
@@ -38,5 +39,5 @@ object Main extends ZIOAppDefault {
3839 private val nettyConfigLayer = ZLayer .succeed(nettyConfig)
3940
4041 val run : UIO [ExitCode ] =
41- Server .serve(app.toHttpApp ).provide(configLayer, nettyConfigLayer, Server .customized).exitCode
42+ Server .serve(app).provide(configLayer, nettyConfigLayer, Server .customized).exitCode
4243}
You can’t perform that action at this time.
0 commit comments