Forward ports
If you need to access the port on a target environment, you can do that using port forwarding. This may be useful, for example, when working on web applications that you need open in the browser while developing.
Press ⌘ ⇧ K.
Start typing Forward Port and select the corresponding action when it appears in the suggestions.
Specify the port mapping in the following format:
8080:9999
. In this example:8080
– the port in the target environment, for example, a Docker container, where your application actually runs9999
– the port on your development machine. You will be able to access the running application through this port. In a web application example, you would be usinglocalhost:9999
in your browser.
Alternatively, you can specify a port in the target environment, and JetBrains Fleet will forward it to an unused port in your development environment.
The forwarding rule appears in the Network Dashboard panel. There, you can review and remove the existing forwarding rules.
Open Network Dashboard
Press ⌘ ⇧ K.
Start typing Show Network Dashboard and select the corresponding action when it appears in the suggestions.