Quickstart
Get started quickly with Sharaf framework.
Mill
def ivyDeps = super.ivyDeps() ++ Agg(
ivy"ba.sake::sharaf:0.10.0"
)
def scalacOptions = super.scalacOptions() ++ Seq("-Yretain-trees")
Sbt
libraryDependencies ++= Seq(
"ba.sake" %% "sharaf" % "0.10.0"
),
scalacOptions ++= Seq("-Yretain-trees")
Scala CLI
Create a file my_script.sc
with the following content:
//> using dep ba.sake::sharaf:0.10.0
and then run it with:
scala-cli my_script.sc --scala-option -Yretain-trees
Examples
- scala-cli examples, standalone examples using scala-cli
- scala-cli HTMX examples, standalone examples featuring HTMX
- API example featuring JSON and validation
- full-stack example featuring HTML, static files and forms
- sharaf-todo-backend, implementation of the todobackend.com spec, featuring CORS handling
- OAuth2 login with Pac4J library
- PetClinic implementation, featuring full-stack app with Postgres db, config, integration tests etc.
- Giter8 template for fullstack app