Skip to content

Commit

Permalink
feat(docs): update docs (#493)
Browse files Browse the repository at this point in the history
feat(docs): update docs

Updates the Wing docs. See details in [workflow run].

[Workflow Run]: https://github.com/winglang/docsite/actions/runs/5419800086

------

*Automatically created via the "update-docs" workflow*
  • Loading branch information
monadabot authored Jun 30, 2023
1 parent d84db83 commit 01597e9
Show file tree
Hide file tree
Showing 21 changed files with 67 additions and 81 deletions.
27 changes: 5 additions & 22 deletions versioned_docs/version-latest/01-start-here/02-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The toolchain includes three tools:

1. **Wing CLI** - the compiler toolchain
2. **Wing VSCode Extension** - IDE support for Wing
3. **Wing Console** - a desktop app for interacting with your Wing programs.
3. **Wing Console** - a web application for viewing and interacting with your Wing programs.

To install Wing, you will need the following setup:

* [Node.js](https://nodejs.org/en/) (v18 or later)
* We recommend [volta](https://volta.sh) to manage node tools
* We recommend [volta](https://volta.sh) to manage node tools
* [VSCode]
* Not required, but currently supported with an [extension](#wing-ide-extension)
* Not required, but currently supported with an [extension](#wing-ide-extension)

## Wing CLI

Expand Down Expand Up @@ -83,26 +83,9 @@ to use it, but it's great. It's available through the VSCode Marketplace [here](

## Wing Console

:::caution Wing Console doesn't support Linux yet

Click :thumbsup: on [this issue](https://github.com/winglang/wing/issues/723) to indicate that you
are looking for Linux support.

:::


The Wing Console is a desktop application that allows you to interact with your
Wing applications running locally on the cloud simulator.

1. Download the latest version of the **Wing Console**:
* [macOS](https://wing-console.s3.amazonaws.com/wing-console.dmg)
* [macOS arm64](https://wing-console.s3.amazonaws.com/wing-console-arm64.dmg)
* [Windows](https://wing-console.s3.amazonaws.com/wing-console.exe)
2. Accept the license agreement.
3. In macOS: drag the Wing Console app into **Applications**

![Drag the Wing Console app into Applications](./console-install.png 'Wing Console app installation')
The Wing Console is a web application that provides a developer-friendly interface for viewing, exploring, and interacting with your Wing applications running on the local cloud simulator.

The Wing Console is included as part of the Wing CLI package. There is no need to install it separately. Once the Wing CLI is successfully installed, you can directly access the Wing Console and begin utilizing its features.

[AWS account]: https://portal.aws.amazon.com/billing/signup
[AWS CLI]: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
Expand Down
43 changes: 17 additions & 26 deletions versioned_docs/version-latest/01-start-here/04-run-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ id: local
keywords: [Wing Local, Wing testing, Wing Console installation, Wing Console usage, Wing Console setup]
---

The Wing Console is a graphical user interface that can be used to interact with
Wing applications on the local machine.
The Wing Console is a web application that provides a developer-friendly interface that can be used to view, explore, and interact with Wing applications running on your local machine.

## Opening your app in the console

Expand All @@ -14,12 +13,9 @@ Wing applications on the local machine.
Make sure you have [installed](./installation#wing-console) the Wing Console on your system
before getting started with this step.

If you are unable to install the Wing Console (e.g. you are running on Linux), you can
also test your application against the [Wing simulator](../concepts/simulator) or [deploy it to AWS](./aws).

:::

We can use the Wing CLI to start the console with our newly created Wing source file:
Use the Wing CLI to start the console with our newly created Wing source file:

```sh
wing it hello.w
Expand All @@ -30,46 +26,41 @@ and load the application.

> The console will "hot reload" your app on each change in the source file parent directory.
Wing Console desktop application will show the following view of you application:
In your Wing Console you will see the following view of you application:

![Wing Console desktop application view](./console-app.png 'Wing Console')

You are now able to run your IDE and the Wing Console side-by-side and watch how changes to your code update your application.

## The console view
## The Wing Console view

In the main view you'll see two resources: a **Queue** and a **Function**.
You'll also notice that the function is connected to the queue through the
`message` event.
In the console [map view](../tools/wing-console#view-and-explore-your-wing-application) you'll see three resources: a **Queue**, a **Function** and a **Bucket**.
The Queue and the Bucket are connected through the Function resource, which serves as a message handler and is set as the consumer for the Queue.

Once you click on the queue resource, the console will navigate into the queue
resource. The inspector pane on the right will show information about your
queue, as well as any relationships (in our case, an outbound relationship to
the function that handles messages).
Click on the Queue resource and pay attention to the right hand panel. This is the [resource interaction panel](../tools/wing-console#interact-with-your-wing-application).

![Queue resource view in Wing Console](./console-queue.png 'Queue resource')

## Sending a message to the queue
## Push a message to the Queue

In the center you should be able to type in a message and send it to the queue.
Type `Wing` and hit **Send Message**.
On the right side interaction panel view, Type a message in the `Push Message` text area (let's say `Wing it`) and hit **Push** in order to push it to the queue.

## Viewing the file
## View the file in the Bucket

On the left sidebar click on the Bucket, you will see the following view:
Now, click on the Bucket in the Console map view. Notice that the interaction panel has changed and now shows the Bucket's interaction view.

![Bucket resource view in Wing Console](./console-bucket-1.png 'Bucket resource')
Check out the `wing.txt` file, click on it and see it's preview.

Now, check the `wing.txt` file and download it, using the download button
![Bucket resource view in Wing Console](./console-bucket-1.png 'Bucket resource')

![Download bucket files in Wing Console](./console-bucket-2.png 'Download bucket files')
You can also download the file, using the **download** button.

The downloaded file should contain `Hello, Wing` text
The downloaded file should contain `Hello, Wing it` text (as you already saw in the preview).

## Congrats! :clap:

You have just written and tested your first Wing program!
You have just written and ran your first Wing program!

---

Now, after you have tested your application, lets deploy it to AWS.
Now, after you have made sure your application works, lets deploy it to AWS.
Binary file modified versioned_docs/version-latest/01-start-here/console-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified versioned_docs/version-latest/01-start-here/console-queue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions versioned_docs/version-latest/05-wing-console/04-testing.md

This file was deleted.

6 changes: 0 additions & 6 deletions versioned_docs/version-latest/05-wing-console/05-logging.md

This file was deleted.

3 changes: 0 additions & 3 deletions versioned_docs/version-latest/05-wing-console/_category_.yml

This file was deleted.

45 changes: 45 additions & 0 deletions versioned_docs/version-latest/06-tools/02-wing-console.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Wing Console
id: wing-console
description: A web application that provides a developer-friendly interface for viewing, exploring, and interacting Wing applications running on the local cloud simulator
keywords: [Wing Console, console, local simulator, local machine, wing it]
---

## Overview

The Wing Console is a web application that offers a user-friendly interface designed to enhance the developer experience when viewing, exploring, and interacting with Wing applications running on the local cloud simulator.

With a primary focus on developer experience, the Console aims to provide instant feedback to developers during the cloud application development process.

Unlike traditional cloud development iterations that involve time-consuming deployments to the cloud, Wing and the Wing Console streamline this process, enabling cloud developers to swiftly receive immediate feedback on code changes directly on their local machines.

![The Wing Console](console-demo-1.png 'Wing Console')

## Installation

The Wing Console is installed as part of the [Wing CLI installation](../01-start-here/02-installation.md#wing-console).

## View And Explore your Wing application
The Console offers two primary views to provide a comprehensive understanding of your Wing application: the Explorer view and the Map view.
1. The left side of the Console features the **Explorer** view, displaying the hierarchical structure of resources within your application.
![The Wing Console Explorer view](console-explorer-1.png 'Wing Console Explorer')
2. Positioned at the center is the **Application Map** view, presenting an overview of the resources in your application along with their relations with each other.
![The Wing Console Map view](console-map-1.png 'Wing Console Map')

## Interact with your Wing application
The Console provides seamless interaction with your Wing application resources, right within the Console interface itself.

When you click on a resource in either the Explorer or Map view, the resource interaction panel on the right side of the Console will automatically update. This panel enables you to conveniently interact with the selected resource.

From there, you can perform various actions such as sending messages to queues, downloading files from buckets, making API requests to your API resource, and more.
![The Wing Console Interaction view](console-interaction-1.png 'Wing Console Interaction')

## 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.
![The Wing Console Tests](console-tests-1.png 'Wing Console Tests')

## Logs
In addition to Interaction abilities, the Console includes a dedicated Logs view, designed for testing and debugging purposes. This view presents real-time logs of your application.

Any logs that you generate within your Wing Application will be automatically displayed within the Logs view, providing you with convenient monitoring of your application's behavior.
![The Wing Console Logs](console-logs-1.png 'Wing Console Logs')
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 01597e9

@vercel
Copy link

@vercel vercel bot commented on 01597e9 Jun 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.