Building Google Cloud Platform Solutions
上QQ阅读APP看书,第一时间看更新

Web Preview

The Cloud Shell Web Preview is a quick and easy way to test web services without leaving your browser. Web Preview creates a publicly available proxy on your specified port, allowing you to access any web service running on that port. The proxy is secured over HTTPS and includes an authentication layer to ensure that only you can access your exposed service. Web Preview runs on port 8080 by default, but can be mapped to any port from 8080-8084 via the Web Preview settings.

To start the Web Preview, click Web Preview | Preview on port 8080. This will create the proxy and open a new browser tab to the public proxy URL. To change the exposed port, click Web Preview | Change Port and choose your desired port, or simply modify the port number at the start of the proxy URL.

The Web Preview can be very helpful for testing code while away from your workstation. For example, one could clone source code from a GCP Source Repository and test changes locally. Alternatively, developers can debug applications stored as Docker images in the Google Container Registry, or test applications using the Cloud Shell's included App Engine development server.