Skip to content

Commit

Permalink
Merge pull request #7 from armanbilge/patch-1
Browse files Browse the repository at this point in the history
Update artifact coordinate in docs
  • Loading branch information
ChristopherDavenport committed Mar 9, 2023
2 parents 33a7771 + e163fac commit 3f0250e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
28 changes: 22 additions & 6 deletions README.md
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
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ThisBuild / developers := List(
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / tlSonatypeUseLegacyHost := true

ThisBuild / tlMimaPreviousVersions := Set()

val Scala212 = "2.12.17"
val Scala213 = "2.13.10"

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The generated APIs use Cats Effect and FS2, and are nearly drop-in replacements
First add the plugin to `project/plugins.sbt`.

```scala
addSbtPlugin("org.http4s" % "sbt-http4s-grpc" % "@VERSION@")
addSbtPlugin("io.chrisdavenport" % "sbt-http4s-grpc" % "@VERSION@")
```

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].
Expand Down

0 comments on commit 3f0250e

Please sign in to comment.