Create composable server modules with ease using Http4s, cats, Flyway, and PostgreSQL. Built for scala 2.12 and 2.13 and scalajs 1.0.
To provide a library of production ready modules, complete with database schema, that can be composed and mounted as HttpService
s. Modules included so far:
tsec
. Bearer and stateless cookie authentication schemes are available.Creating a module: See a start to finish implementation example
PRs and issues are so welcome on this project. Generally contributors don't have to be people that commit code or even write issues. Thanks especially to:
An example project exists in /example-server
, which aggregates all the modules into a single server. To run, execute exampleServerJVM/reStart
in sbt.
Add any of the following dependencies to your build.sbt. There are interdependencies too, so you may consult build.sbt
to see which modules depend on which, and thus may not need to be declared in your build.sbt
.
libraryDependencies ++= Seq(
"h4sm-auth",
"h4sm-features",
"h4sm-files",
"h4sm-invitations",
"h4sm-store",
"h4sm-messages",
"h4sm-permissions"
).map("com.clovellytech" %% _ % h4smVersion)
Clients are prebuilt for several modules. You can include them in your scalajs projects as:
libraryDependencies ++= Seq(
"h4sm-auth-client",
"h4sm-features-client",
).map("com.clovellytech" %%% _ % h4smVersion)