- gRPC Server Configuration
Configure the gRPC Server using the Helidon configuration framework, either programmatically or via a configuration file.
Configuring the gRPC Server in your code
The easiest way to configure the gRPC Server is in your application code.
GrpcServerConfiguration configuration = GrpcServerConfiguration.builder()
.port(8080)
.build();
GrpcServer grpcServer = GrpcServer.create(configuration, routing);content_copy
Configuring the gRPC Server in a configuration file
You can also define the configuration in a file.
GrpcServer configuration file
application.yamlgrpcserver:
port: 3333content_copy
Then, in your application code, load the configuration from that file.
GrpcServer initialization using the
application.conf file located on the classpathGrpcServerConfiguration configuration = GrpcServerConfiguration.create(
Config.builder()
.sources(classpath("application.conf"))
.build());
GrpcServer grpcServer = GrpcServer.create(configuration, routing);content_copy
Configuration options
See all configuration options here.