Skip to content

Commit

Permalink
docs(docs): added docs for tunnels in the wing console (#6836)
Browse files Browse the repository at this point in the history
Fixes #6654

New section added to the Wing console page in the docs to explain tunnels and how to open/close them.

## Checklist

- [ ] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted)
- [ ] Description explains motivation and solution
- [ ] Tests added (always)
- [ ] Docs updated (only required for features)
- [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
  • Loading branch information
boyney123 authored Jul 4, 2024
1 parent 3ad156b commit 1cda481
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/docs/06-tools/02-wing-console.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,41 @@ From there, you can perform various actions such as sending messages to queues,

![The Wing Console Interaction view](console-interaction-1.png 'Wing Console Interaction')

## Exposing endpoints with Wing tunnels

The console gives you the ability to create a secure (https) tunnel to expose your API to the internet.

<iframe width="460" height="315" src="https://www.youtube.com/embed/6y47uQXjg2s?si=lNNzZcr3clzIBinc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

During development tunnels can be helpful to help with integration testing (e.g webhook testing).

Creating a tunnel will provide you with a secure wingcloud endpoint URL (e.g https://{ID}.endpoints.wingcloud.dev/).

:::warning
Creating a tunnel exposes your API to the internet and may be a security risk.
:::

### Creating a Wing tunnel

1. Click on the **Expose** button next to the API route (can take a few seconds).
1. Once the tunnel has been created, click on the **link** to view the tunnel URL.
- URL will look https://{RANDOM_ID}.endpoints.wingcloud.dev/

![The Wing Console tunnel creation](console-open-tunnel.png 'Open Wing Console tunnel')

### Closing a tunnel

1. Click on the **Close** button next to the API route (can take a few seconds).
1. Verify your tunnel is closed. Click on the **link** to view the tunnel URL.

![The Wing Console tunnel closing](console-close-tunnel.png 'Close Wing Console tunnel')

:::tip Tunnels will automatically close when wing console stops
**Tunnels will be closed automatically when you stop the Wing console**.

Tunnels will automatically be open when you start your Wing console if they were previously left open.
:::

## Run Tests

The Console enables you to run the tests you wrote for your Wing application and view the results of these tests in real-time.
Expand Down
Binary file added docs/docs/06-tools/console-close-tunnel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/docs/06-tools/console-open-tunnel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1cda481

Please sign in to comment.