-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from armanbilge/patch-1
Update artifact coordinate in docs
- Loading branch information
Showing
3 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
# http4s-grpc - Http4s GRPC [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.http4s/http4s-grpc_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.http4s/http4s-grpc_2.13) ![Code of Conduct](https://img.shields.io/badge/Code%20of%20Conduct-Scala-blue.svg) | ||
# http4s-grpc | ||
|
||
## [Head on over to the microsite](https://davenverse.github.io/http4s-grpc) | ||
A pure Scala [gRPC] implementation! Use it with [http4s Ember] 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 | ||
|
||
To use http4s-grpc in an existing SBT project with Scala 2.13 or a later version, add the following dependencies to your | ||
`build.sbt` depending on your needs: | ||
First add the plugin to `project/plugins.sbt`. | ||
|
||
```scala | ||
libraryDependencies ++= Seq( | ||
"org.http4s" %% "http4s-grpc" % "<version>" | ||
addSbtPlugin("io.chrisdavenport" % "sbt-http4s-grpc" % "0.0.1") | ||
``` | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters