File tree Expand file tree Collapse file tree 6 files changed +660
-1
lines changed
docs/modules/ROOT/pages/scalalib
example/scalalib/web/9-todo-http4s Expand file tree Collapse file tree 6 files changed +660
-1
lines changed Original file line number Diff line number Diff line change @@ -39,4 +39,8 @@ include::partial$example/scalalib/web/7-cross-platform-version-publishing.adoc[]
3939
4040== Scala.js WebAssembly Example
4141
42- include::partial$example/scalalib/web/8-wasm.adoc[]
42+ include::partial$example/scalalib/web/8-wasm.adoc[]
43+
44+ == TodoMVC http4s Web App
45+
46+ include::partial$example/scalalib/web/9-todo-http4s.adoc[]
Original file line number Diff line number Diff line change 1+ package build
2+ import mill._, scalalib._
3+
4+ object `package` extends RootModule with ScalaModule {
5+ def scalaVersion = "2.13.8"
6+ def ivyDeps = Agg(
7+ ivy"org.http4s::http4s-ember-server::0.23.30",
8+ ivy"org.http4s::http4s-dsl::0.23.30",
9+ ivy"org.http4s::http4s-scalatags::0.25.2",
10+ ivy"io.circe::circe-generic::0.14.10"
11+ )
12+
13+ object test extends ScalaTests {
14+ def testFramework = "utest.runner.Framework"
15+
16+ def ivyDeps = Agg(
17+ ivy"com.lihaoyi::utest::0.8.5",
18+ ivy"org.typelevel::cats-effect-testing-utest::1.6.0",
19+ ivy"org.http4s::http4s-client::0.23.30"
20+ )
21+ }
22+ }
23+
24+ // This example demonstrates how to set up a simple Scala webserver
25+ // implementing the popular Todo-MVC demo application. It includes a test suite
26+ // that spins up the web server locally and makes HTTP requests against it.
27+
28+ /** Usage
29+
30+ > ./mill test
31+ + webapp.WebAppTests.simpleRequest...
32+
33+ > ./mill runBackground
34+
35+ > curl http://localhost:8084
36+ ...What needs to be done...
37+ ...
38+
39+ > ./mill clean runBackground
40+
41+ */
You can’t perform that action at this time.
0 commit comments