If you want to access an application that is running in your dev space from an external source (for example a browser or REST client), you must first expose the port that is listening to the application.
When running an application that listens to a port, SAP Business Application Studio displays a notification prompting you to expose and open the port.
-
Click Expose and Open.
The port is exposed and you can preview the service in a new browser tab.
If you missed the notification, you can do this manually from the command palette by entering the Ports: Expose command.
-
Enter a name for the port.
If you want to remove the external access, enter the Ports: Unexpose command in the command palette.
This removes internet access to the applications running on the respective dev space.
-
Enter the Ports: Preview command in the command palette.
A list of all the exposed applications is displayed.
-
Click the relevant application.
The exposed application opens in a new tab.
-
Enter the Ports: Rename command in the command palette.
-
Select the desired port.
-
Provide a new name for the port when prompted.
You can have a maximum of 5 ports exposed at a time.
- In SAP Business Application Studio, open the Preferences view.
- Search for Ports.
- From the list of preferences, select Ports.
- Under Exclude Expose Notifications, click Edit in settings.json.
- Specify the port or range of ports for which you do not want to show a notification.
- Save your changes.