https://github.com/pjfanning/zio-http-example
Example of how to use zio-http with scala 3
https://github.com/pjfanning/zio-http-example
scala3 zio zio-http zio2
Last synced: about 2 months ago
JSON representation
Example of how to use zio-http with scala 3
- Host: GitHub
- URL: https://github.com/pjfanning/zio-http-example
- Owner: pjfanning
- License: apache-2.0
- Created: 2022-03-05T17:06:50.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-16T23:48:53.000Z (over 1 year ago)
- Last Synced: 2025-10-06T17:53:41.467Z (6 months ago)
- Topics: scala3, zio, zio-http, zio2
- Language: Scala
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zio-http-example
Example of how to use zio-http with scala 3.
* Checkout this repo to your machine.
* There is a simpler version of this example in the `without-metrics` branch
* The `main` branch includes examples of how to use [zio-metrics-micrometer](https://github.com/pjfanning/zio-metrics-micrometer)
```
sbt run
```
```
curl -v http://localhost:8090/json
curl -v http://localhost:8090/text
curl -v http://localhost:8090/timed
```
After a few calls to these endpoints, you can get count metrics in [Prometheus](https://prometheus.io/) format by calling:
```
curl -v http://localhost:8090/metrics
```