Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/http4s/http4s-grpc
https://github.com/http4s/http4s-grpc
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/http4s/http4s-grpc
- Owner: http4s
- License: mit
- Created: 2023-03-08T06:21:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-01T08:18:08.000Z (2 months ago)
- Last Synced: 2024-12-01T09:24:54.631Z (2 months ago)
- Language: Scala
- Homepage: https://http4s.github.io/http4s-grpc/
- Size: 236 KB
- Stars: 40
- Watchers: 8
- Forks: 5
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-grpc - http4s-grpc - A pure Scala gRPC implementation! Use it with http4s Ember and deploy on JVM, Node.js, and Native. (Language-Specific / Scala)
README
# http4s-grpc
![Maven Central](https://img.shields.io/maven-central/v/org.http4s/http4s-grcp_2.13?style=flat)A pure Scala [gRPC] implementation! Use it with [http4s Ember] or any other applicable Backend and deploy on JVM, Node.js, and Native.
The generated APIs use Cats Effect and FS2, and are nearly drop-in replacements for code generated by [fs2-grpc].
[gRPC]: https://grpc.io/
[http4s Ember]: https://http4s.org/v0.23/docs/integrations.html#ember
[fs2-grpc]: https://github.com/typelevel/fs2-grpc## Quick Start
First add the plugin to `project/plugins.sbt`.
```scala
addSbtPlugin("org.http4s" % "sbt-http4s-grpc" % "VERSION_FROM_BADGE")
```Then in your `build.sbt` enable the `Http4sGrpcPlugin` to configure the http4s-grpc codegen. In addition, you will need to configure the [ScalaPB] codegen by following their [installation docs][ScalaPB installation].
```scala
enablePlugins(Http4sGrpcPlugin)
Compile / PB.targets ++= Seq(
// set grpc = false because http4s-grpc generates its own code
scalapb.gen(grpc = false) -> (Compile / sourceManaged).value / "scalapb"
)
```[ScalaPB]: https://scalapb.github.io/
[ScalaPB installation]: https://scalapb.github.io/docs/installation