Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/http4s/http4s-grpc


https://github.com/http4s/http4s-grpc

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

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