Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0.x] Enable PlayNettyServer in projects that require Http2 support #527

Draft
wants to merge 2 commits into
base: 3.0.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions play-java-grpc-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ This is an example application that shows how to use Pekko gRPC to both expose a

For detailed documentation refer to https://www.playframework.com/documentation/latest/Home and https://pekko.apache.org/docs/pekko-grpc/current/.

## Server backend

By default, the project uses the Pekko HTTP Server backend. To switch to the Netty Server backend, enable the `PlayNettyServer` sbt plugin in the `build.sbt` file.
In the `build.sbt` of this project, you'll find a commented line for this setting; simply uncomment it to make the switch.
For more detailed information, refer to the Play Framework [documentation](https://www.playframework.com/documentation/3.0.x/Server).

## Sample license

Expand Down
1 change: 1 addition & 0 deletions play-java-grpc-example/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ version := "1.0-SNAPSHOT"
// build.sbt
lazy val `play-java-grpc-example` = (project in file("."))
.enablePlugins(PlayJava)
//.enablePlugins(PlayNettyServer).disablePlugins(PlayPekkoHttpServer) // uncomment to use the Netty backend
.enablePlugins(PekkoGrpcPlugin) // enables source generation for gRPC
.enablePlugins(PlayPekkoHttp2Support) // enables serving HTTP/2 and gRPC
// #grpc_play_plugins
Expand Down
5 changes: 5 additions & 0 deletions play-scala-grpc-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ This is an example application that shows how to use Pekko gRPC to both expose a

For detailed documentation refer to https://www.playframework.com/documentation/latest/Home and https://pekko.apache.org/docs/pekko-grpc/current/.

## Server backend

By default, the project uses the Pekko HTTP Server backend. To switch to the Netty Server backend, enable the `PlayNettyServer` sbt plugin in the `build.sbt` file.
In the `build.sbt` of this project, you'll find a commented line for this setting; simply uncomment it to make the switch.
For more detailed information, refer to the Play Framework [documentation](https://www.playframework.com/documentation/3.0.x/Server).

## Sample license

Expand Down
1 change: 1 addition & 0 deletions play-scala-grpc-example/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ version := "1.0-SNAPSHOT"
// build.sbt
lazy val `play-scala-grpc-example` = (project in file("."))
.enablePlugins(PlayScala)
//.enablePlugins(PlayNettyServer).disablePlugins(PlayPekkoHttpServer) // uncomment to use the Netty backend
.enablePlugins(PekkoGrpcPlugin) // enables source generation for gRPC
.enablePlugins(PlayPekkoHttp2Support) // enables serving HTTP/2 and gRPC
// #grpc_play_plugins
Expand Down
6 changes: 6 additions & 0 deletions play-scala-tls-example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ You must have JDK 11 installed on your machine to run this, to take advantage of

* [Adoptium OpenJDK](https://adoptium.net/)

## Server backend

By default, the project uses the Pekko HTTP Server backend. To switch to the Netty Server backend, enable the `PlayNettyServer` sbt plugin in the `build.sbt` file.
In the `build.sbt` of this project, you'll find a commented line for this setting; simply uncomment it to make the switch.
For more detailed information, refer to the Play Framework [documentation](https://www.playframework.com/documentation/3.0.x/Server).

## Generate Certificates

To use HTTPS, you must have X.509 certificates. Generating certificates can be painful, so all the scripts needed to generate the certificates needed are included in the `scripts` directory. For more detail, you can see the [Certificate Generation](https://www.playframework.com/documentation/latest/CertificateGeneration) section in Play WS SSL.
Expand Down
3 changes: 3 additions & 0 deletions play-scala-tls-example/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ val commonSettings = Seq(

lazy val one = (project in file("modules/one"))
.enablePlugins(PlayScala)
//.enablePlugins(PlayNettyServer).disablePlugins(PlayPekkoHttpServer) // uncomment to use the Netty backend
.settings(commonSettings)

lazy val two = (project in file("modules/two"))
.enablePlugins(PlayScala)
//.enablePlugins(PlayNettyServer).disablePlugins(PlayPekkoHttpServer) // uncomment to use the Netty backend
.settings(commonSettings)

lazy val root = (project in file("."))
.enablePlugins(PlayScala, PlayPekkoHttp2Support)
//.enablePlugins(PlayNettyServer).disablePlugins(PlayPekkoHttpServer) // uncomment to use the Netty backend
.settings(commonSettings)
.settings(
name := """play-scala-tls-example""",
Expand Down
Loading