Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
refactor: start on a functional domain design implementation for onto…
- Loading branch information
Showing
14 changed files
with
524 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ sipi/test | |
bazel-* | ||
|
||
**/project/target/ | ||
/target/ | ||
**/target/ | ||
*.aux | ||
*.bbl | ||
*.bcf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package dsp.api.main | ||
|
||
import dsp.schema.repo.{SchemaRepo, SchemaRepoLive} | ||
import zio.Console.printLine | ||
import zio._ | ||
|
||
object MainApp extends ZIOAppDefault { | ||
val effect: ZIO[Console with SchemaRepo, Nothing, Unit] = | ||
for { | ||
profile <- SchemaRepo.lookup("user1").orDie | ||
_ <- printLine(profile).orDie | ||
_ <- printLine(42).orDie | ||
} yield () | ||
|
||
val mainApp: ZIO[Any, Nothing, Unit] = effect.provide(Console.live ++ SchemaRepoLive.layer) | ||
def run: ZIO[Any, Nothing, Unit] = mainApp | ||
} |
13 changes: 13 additions & 0 deletions
13
dsp-schema-api/src/main/scala/dsp/schema/api/app/App.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package dsp.schema.api | ||
|
||
import zio._ | ||
import zhttp.http._ | ||
import zhttp.service.Server | ||
|
||
object App extends ZIOAppDefault { | ||
val app = Http.collect[Request] { case Method.GET -> !! / "text" => | ||
Response.text("Hello World!") | ||
} | ||
|
||
def run = Server.start(8090, app) | ||
} |
Oops, something went wrong.