I use PC from Rust test.
I start PC or connect to existing, depends.
But next things could reduce surprise and improve convenice with ports of PC:
- 8080 default port is too default. consider choosing some existing port from not occupied by IANA(8080 occupied), and in theory years after which can be occupied by PC. it will make run PC more safe (with server)
- allow for dynamic port. so when I launch PC, i own process handle and PC ensures it binds to free port. as process handle owner I just need some data set for this process. I can be write to PC_PORT_NUM env (it was not set on start) or it can be stdout with some text string to match