Open Links in Browser
DevSpace allows you to define URLs that should open after deploying an application in development mode, i.e. using devspace dev
.
The configuration for automatically opening URLs can be found in the dev.*.open
section of devspace.yaml
.
dev:
my-dev:
open:
- url: http://localhost:3000/dashboard # Open the dashboard page of your app UI
- url: http://localhost:8089/ # Open DevSpace UI
How does it work?
- DevSpace starts to periodically send
HTTP GET
requests to the URLs provideded viadev.*.open[*].url
. - As soon as the first HTTP response has a status code which is neither 502 (Bad Gateway) nor 503 (Service Unavailable), DevSpace assumes that the application is now started, stops sending any further requests and opens the provided URL in the browser.
- If the URL is still returning status code 502 or 503 after 4min, DevSpace will stop trying to open it. To not disturb the log streaming or the interactive terminal session, DevSpace will not show an error when hitting the 4min timeout.