solution: configurable port

This commit is contained in:
Igor Artamonov
2019-06-13 22:45:46 -04:00
parent 591eb73f45
commit 8beeb0877a
2 changed files with 4 additions and 1 deletions

View File

@@ -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)
}

View File

@@ -0,0 +1 @@
port=9001