logo

Expose Ports via Port URL

‘Port URLs’ let you expose a specific port on your Nimbus Workspace via a URL. These links inherit the workspace address and can only be configured within the Nimbus VS Code extension.
During development, engineers may want to get some quick feedback from UX designers before even pushing the code changes. You can expose the applications or APIs running on Nimbus workspace to public so your collaborators can also access your application that is running on your workspace, just like how you access the application on your localhost.

How do I use Port URLs

Port URLs can be enabled in the VS Code panel. By default, when connecting to a Nimbus workspace, you will see Problems, Output, Debug Console, Terminal, Ports and Nimbus. The easiest way to access this is to launch the terminal and look for the ‘Ports’ and ‘Nimbus’ tab to the right of the panel. The ‘Nimbus’ tab is the one you will use to create Port URLs.

Ports tab (VS Code)

Before talking about the ‘Nimbus’ tab, lets talk about the ‘Ports’ tab.
The ports tab is used to forward ports from your Nimbus workspace to your local machine. This tab is not used to create or share Port URLs and ports do not have to be forwarded to use Port URLs.
With this tab, you are able to run an application using the local address on your browser (e.g. localhost:3000). Most applications run on a Nimbus workspace port will be forwarded. Though this is not needed for Port URLs, this is a good way to view and test the application before sharing.
Image without caption

Nimbus tab (VS Code)

This tab is used to expose some ports running on your workspaces to public access.
To create the Port URL, enter the port number in the Port column within the ‘Nimbus’ tab and click “Open Port”. Once created, it takes about 15 seconds for a created Port URL to be accessible.
To expose a port, enter the port number in the Port column within the ‘Nimbus’ tab and click “Open Port”. It takes about 15 seconds for the port to be publicly accessible.
Image without caption
By default, Port URLs are accessible to anyone with the URL (i.e. link). Enterprise users are able to protect URLs behind an authentication layer.
Port URLs can only be run to applications that listen on 0.0.0.0. The most common reason a Port URL does not work is that the application in development is listening to another address (e.g. 127.0.0.0) but these applications will still work on local addresses that have had their port forwarded. Changing the source to listen on 0.0.0.0 will resolve this issue.

Helpful?