diff --git a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt index 5b709e85..1fbbfcbf 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/GrpcServer.kt @@ -26,7 +26,9 @@ open class GrpcServer( @PostConstruct fun start() { log.info("Starting GRPC Server...") - val serverBuilder = ServerBuilder.forPort(8090) + val port = env.getProperty("port", "8090").toInt() + log.info("Listening on 0.0.0.0:$port") + val serverBuilder = ServerBuilder.forPort(port) rpcs.forEach { serverBuilder.addService(it) } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index e69de29b..61c5c2c5 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -0,0 +1 @@ +port=9001