mirror of
https://github.com/OpenLiberty/liberty-bikes.git
synced 2024-11-27 01:20:01 +08:00
Print external URL for frontend during build
This commit is contained in:
parent
4f1f7f810b
commit
6dc84d209b
@ -78,6 +78,19 @@ npm_start {
|
||||
dependsOn 'libertyStop'
|
||||
}
|
||||
|
||||
libertyStart.doLast {
|
||||
NetworkInterface.getNetworkInterfaces()
|
||||
.findAll { it.isUp() && !it.isLoopback() && !it.isVirtual() }
|
||||
.each {
|
||||
it.getInetAddresses()
|
||||
.findAll { !it.isLoopbackAddress() && it instanceof Inet4Address }
|
||||
.each {
|
||||
// ${it} is in the format /<IP>, so only use http:/ instead of http://
|
||||
println "Application externally available at: http:/${it}:${httpPort}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
liberty {
|
||||
server {
|
||||
name = 'frontendServer'
|
||||
|
Loading…
Reference in New Issue
Block a user