You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/tutorial-develop-with-visual-studio-code.md
+20-12Lines changed: 20 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ In this tutorial, you create a chat application using Azure Web PubSub with the
25
25
26
26
1. Open a new Visual Studio Code window.
27
27
28
-
1.Select <kbd>F1</kbd> to open the command palette.
28
+
1.Press <kbd>F1</kbd> to open the command palette.
29
29
30
30
1. Enter **Git: Clone** and press enter.
31
31
@@ -44,7 +44,7 @@ In this tutorial, you create a chat application using Azure Web PubSub with the
44
44
45
45
## Sign in to Azure
46
46
47
-
1. Select <kbd>F1</kbd> to open the command palette.
47
+
1. Press <kbd>F1</kbd> to open the command palette.
48
48
49
49
1. Select **Azure: Sign In** and follow the prompts to authenticate.
50
50
@@ -55,15 +55,15 @@ In this tutorial, you create a chat application using Azure Web PubSub with the
55
55
The Azure Web PubSub extension for Visual Studio Code enables users to quickly create, manage, and utilize Azure Web PubSub Service and its developer tools such as [Azure Web PubSub Local Tunnel Tool](https://www.npmjs.com/package/@azure/web-pubsub-tunnel-tool).
56
56
In this scenario, you create a new Azure Web Pubsub Service resource and configure it to host your application. After installing the Web PubSub extension, you can access its features under the Azure control panel in Visual Studio Code.
57
57
58
-
1. Select <kbd>F1</kbd> to open the command palette and run the **Azure Web PubSub: Create Web PubSub Service** command.
58
+
1. Press <kbd>F1</kbd> to open the command palette and run the **Azure Web PubSub: Create Web PubSub Service** command.
59
59
60
60
1. Enter the following values as prompted by the extension.
61
61
62
62
| Prompt | Value |
63
63
|--|--|
64
64
| Select subscription | Select the Azure subscription you want to use. |
65
65
| Select resource group | Select the Azure resource group you want to use. |
66
-
| Enter a name for the service | Enter *my-wps*. |
66
+
| Enter a name for the service | Enter `my-wps`. |
67
67
| Select a location | Select an Azure region close to you. |
68
68
| Select a pricing tier | Select a pricing tier you want to use. |
69
69
| Select a unit count | Select a unit count you want to use.|
@@ -75,13 +75,13 @@ In this scenario, you create a new Azure Web Pubsub Service resource and configu
75
75
## Create a hub setting
76
76
1. Open **Azure** icon in the Activity Bar in the left side of Visual Studio Code.
77
77
78
-
> If your activity bar is hidden, you won't be able to access the extension. Show the Activity Bar by clicking View > Appearance > Show Activity Bar
78
+
> If your activity bar is hidden, you won't be able to access the extension. Show the Activity Bar by clicking **View > Appearance > Show Activity Bar**
79
79
80
-
1. In the resource tree, find the Azure Web Pubsub resource **my-wps** you created and click it to expand
80
+
1. In the resource tree, find the Azure Web Pubsub resource `my-wps` you created and click it to expand
81
81
82
82
1. Right click the item **Hub Settings** and then select **Create Hub Setting**
83
83
84
-
1. Input *sample_chat* as the hub name and create the hub setting. It doesn't matter whether to create extra event handlers or not. Wait for the progress notification shown as finished
84
+
1. Input `sample_chat` as the hub name and create the hub setting. It doesn't matter whether to create extra event handlers or not. Wait for the progress notification shown as finished
85
85
86
86
1. Below the item **Hub Settings**, a new subitem *Hub sample_chat* shall appear. Right click on the new item and then choose "Attach Local Tunnel"
87
87
@@ -96,15 +96,23 @@ In this scenario, you create a new Azure Web Pubsub Service resource and configu
96
96
1. The extension will created a new terminal to run the Local Tunnel Tool and a notification reminds you to open Local Tunnel Portal shows up. Click the button "Yes" or open "http://localhost:4000" in web browser manually to view the portal.
97
97
98
98
## Run the server application
99
-
1. Ensure your working directory is `azure-webpubsub/samples/javascript/chatapp/nativeapi`
99
+
1. Ensure working directory is `azure-webpubsub/samples/javascript/chatapp/nativeapi`
100
100
101
-
1. Run `npm install`
101
+
1. Install Node.js dependencies
102
102
103
-
1. Open **Azure** icon in the Activity Bar and find the Azure Web PubSub resource **my-wps**. Then right click on the resource item and select **Copy Connection String**. The connection string is copied to your clipboard
103
+
```bash
104
+
npm install
105
+
```
106
+
107
+
1. Open **Azure** icon in the Activity Bar and find the Azure Web PubSub resource `my-wps`. Then right click on the resource item and select **Copy Connection String**. The connection string is copied to your clipboard
104
108
105
-
1. Run the server application `node server.js "<paste-your-connection-string-here>"`
109
+
1. Run the server application with copied connection string
110
+
111
+
```bash
112
+
node server.js "<connection-string>"
113
+
```
106
114
107
-
1. Open http://localhost:8080/index.html in browser to try your chat application.
115
+
1. Open `http://localhost:8080/index.html` in browser to try your chat application.
108
116
109
117
> [!TIP]
110
118
> Having issues? Let us know on GitHub by opening an issue in the [Azure Web PubSub repo](https://github.com/azure/azure-webpubsub/).
0 commit comments