I have two Play framework web applications running on my system on ports 9001 and 9002. I was wondering if there was any way I could retrieve which port they were running on from within my Java code.
Is this possible?
For changing the port, go to your project root folder and hit: activator "run 8008" in command prompt / terminal. and that's it.
Overriding configuration with system properties The default is to listen on port 9000 at the 0.0. 0.0 address (all addresses).
Abstract: Polygraph is a tool to quantify system behavior that violates serial execution of transactions. It is a plug-n-play framework that operates externally to the system at the conceptual granularity of entities and their relationships.
Yes. You can get the port like this:
int port = Integer.parseInt(Play.configuration.getProperty("http.port", 9000));
Of course, you have to import the class play.Play
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With