diff --git a/build.sbt b/build.sbt index 365cbc7..4e8d8e4 100644 --- a/build.sbt +++ b/build.sbt @@ -87,7 +87,6 @@ lazy val cli = (project in file("cli")) "--allow-incomplete-classpath", "--no-fallback", "--install-exit-handlers", - "--libc=musl", "-H:+ReportExceptionStackTraces", "-H:+RemoveSaturatedTypeFlows", "-H:+TraceClassInitialization", diff --git a/cli-frontend/index.html b/cli-frontend/index.html index 8487f42..90a6a74 100644 --- a/cli-frontend/index.html +++ b/cli-frontend/index.html @@ -1,10 +1,14 @@ + + + - - + + zio-app
<%- script %> - \ No newline at end of file + + diff --git a/cli/src/main/g8/application.conf.yaml b/cli/src/main/g8/application.conf.yaml deleted file mode 100644 index d3ca045..0000000 --- a/cli/src/main/g8/application.conf.yaml +++ /dev/null @@ -1,12 +0,0 @@ -# Sorry for the YAML - -usernames: - - Moose - - Squirrel - - Flapjack - - Banana - - Quetzalcoatal - - Dungaree - - Bumpy - - Snickers - - Brobostigan diff --git a/cli/src/main/g8/backend/application.conf b/cli/src/main/g8/backend/application.conf new file mode 100644 index 0000000..0d639cb --- /dev/null +++ b/cli/src/main/g8/backend/application.conf @@ -0,0 +1,3 @@ +# This file is in HOCON format, a superset of JSON + +usernames = [ "Moose" , "Squirrel" , "Flapjack" , "Banana" , "Quetzalcoatal" , "Dungaree" , "Bumpy" , "Snickers" , "Brobostigan"] diff --git a/cli/src/main/g8/backend/src/main/scala/$package$/Backend.scala b/cli/src/main/g8/backend/src/main/scala/$package$/Backend.scala index c241a8c..1c6d808 100644 --- a/cli/src/main/g8/backend/src/main/scala/$package$/Backend.scala +++ b/cli/src/main/g8/backend/src/main/scala/$package$/Backend.scala @@ -16,7 +16,9 @@ object Backend extends App { } yield () override def run(args: List[String]): URIO[zio.ZEnv, ExitCode] = { - program.injectCustom(ExampleServiceLive.layer).exitCode + program + .injectCustom(Config.live, ExampleServiceLive.layer) + .exitCode } } @@ -26,4 +28,4 @@ case class ExampleServiceLive(random: zio.random.Random.Service) extends Example object ExampleServiceLive { val layer = (ExampleServiceLive.apply _).toLayer[ExampleService] -} \ No newline at end of file +} diff --git a/cli/src/main/g8/backend/src/main/scala/$package$/Config.scala b/cli/src/main/g8/backend/src/main/scala/$package$/Config.scala index 3375187..29ed093 100644 --- a/cli/src/main/g8/backend/src/main/scala/$package$/Config.scala +++ b/cli/src/main/g8/backend/src/main/scala/$package$/Config.scala @@ -2,8 +2,8 @@ package $package$ import zio._ import zio.config._ -import zio.config.yaml._ import zio.config.magnolia._ +import zio.config.typesafe._ import java.io.File @@ -14,7 +14,7 @@ object Config { DeriveConfigDescriptor.descriptor[Config] val live: ZLayer[system.System, Nothing, Has[Config]] = - YamlConfig.fromFile(new File("../application.conf.yaml"), descriptor).orDie + TypesafeConfig.fromHoconFile(new File("application.conf"), descriptor).orDie val service: URIO[Has[Config], Config] = ZIO.service[Config] } diff --git a/cli/src/main/g8/build.sbt b/cli/src/main/g8/build.sbt index 9f2efe4..ee5e99f 100644 --- a/cli/src/main/g8/build.sbt +++ b/cli/src/main/g8/build.sbt @@ -1,13 +1,13 @@ name := "$name$" description := "$description$" -version := "0.1" +version := "0.0.1" val animusVersion = "0.1.9" val laminarVersion = "0.13.0" val quillZioVersion = "3.7.1" val sttpVersion = "3.3.6" val zioAppVersion = "0.2.5" -val zioConfigVersion = "1.0.5" +val zioConfigVersion = "1.0.6" val zioHttpVersion = "1.0.0.0-RC17" val zioJsonVersion = "0.1.5" val zioMagicVersion = "0.3.3" diff --git a/cli/src/main/g8/index.html b/cli/src/main/g8/index.html index 382b43d..e00ed27 100644 --- a/cli/src/main/g8/index.html +++ b/cli/src/main/g8/index.html @@ -1,10 +1,14 @@ + + + - - + + $name$ -
- <%- script %> - \ No newline at end of file +
+<%- script %> + + diff --git a/cli/src/main/resources/resource-config.json b/cli/src/main/resources/resource-config.json index 8189810..98be5dc 100644 --- a/cli/src/main/resources/resource-config.json +++ b/cli/src/main/resources/resource-config.json @@ -5,7 +5,5 @@ {"pattern":"\\Qdist/index.html\\E"} ], "bundles":[ - {"name":"sun.awt.resources.awt"}, - {"name":"sun.awt.resources.awtosx"} ] } diff --git a/examples/index.html b/examples/index.html index 1a834bf..3919fbe 100644 --- a/examples/index.html +++ b/examples/index.html @@ -1,10 +1,14 @@ + + + - - + + ZIO App Example
<%- script %> - \ No newline at end of file + +