Add support for injecting the port and client dir.
Get the client dir from the environment.