adding backend project

will try to do rest & websocket api with http4s
This commit is contained in:
efim
2023-04-23 11:12:08 +04:00
parent 7e488b7e62
commit d8af92787d
6 changed files with 70 additions and 4 deletions

View File

@@ -1,10 +1,14 @@
import org.scalajs.linker.interface.ModuleSplitStyle
lazy val planningPokerGrargh = project
.in(file("."))
lazy val commonSettings = Seq(
scalaVersion := "3.2.0"
)
lazy val frontend = project
.in(file("frontend"))
.enablePlugins(ScalaJSPlugin) // Enable the Scala.js plugin in this project
.settings(
scalaVersion := "3.2.0",
commonSettings,
// Tell Scala.js that this is an application with a main method
scalaJSUseMainModuleInitializer := true,
@@ -29,3 +33,27 @@ lazy val planningPokerGrargh = project
libraryDependencies += "org.scala-js" %%% "scalajs-dom" % "2.4.0",
libraryDependencies += "com.raquo" %%% "laminar" % "15.0.1"
)
.dependsOn(common)
lazy val backend = project
.in(file("backend"))
.settings(
commonSettings,
libraryDependencies ++= Seq(
"org.http4s" %% "http4s-ember-client" % http4sVersion,
"org.http4s" %% "http4s-ember-server" % http4sVersion,
"org.http4s" %% "http4s-dsl" % http4sVersion
),
// available for 2.12, 2.13, 3.2
libraryDependencies += "co.fs2" %% "fs2-core" % "3.6.1",
libraryDependencies += "org.typelevel" %% "cats-core" % "2.9.0",
libraryDependencies += "org.typelevel" %% "cats-effect" % "3.4.9"
)
.dependsOn(common)
val http4sVersion = "1.0.0-M39"
lazy val common = project
.in(file("common"))
.settings(
commonSettings
)