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/communication-services/samples/chat-hero-sample.md
+16-25Lines changed: 16 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,20 +50,10 @@ Below you'll find more information on prerequisites and steps to set up the samp
50
50
51
51
## Prerequisites
52
52
53
+
-[Visual Studio Code (Stable Build)](https://code.visualstudio.com/download)
54
+
-[Node.js (16.14.2 and above)](https://nodejs.org/en/download/)
53
55
- Create an Azure account with an active subscription. For details, see [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
54
-
-[Node.js (8.11.2 and above)](https://nodejs.org/en/download/)
55
-
-[Visual Studio (2017 and above)](https://visualstudio.microsoft.com/vs/)
56
-
-[.NET Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1) (Make sure to install version that corresponds with your visual studio instance, 32 vs 64 bit)
57
-
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Services resource](../quickstarts/create-communication-resource.md). You'll need to record your resource **connection string** for this quickstart.
58
-
59
-
## Locally deploying the service & client app
60
-
61
-
The single threaded chat sample is essentially two "applications" a client and server application.
62
-
63
-
Open up Visual Studio on the chat.csproj and run in Debug mode, this will start up the chat front end service. When the server app is visited
64
-
from the browser, it will redirect traffic towards the locally deployed chat front end service.
65
-
66
-
You can test the sample locally by opening multiple browser sessions with the URL of your chat to simulate a multi-user chat.
56
+
- Create an Azure Communication Services resource. For details, see [Create an Azure Communication Resource](../quickstarts/create-communication-resource.md). You'll need to record your resource **connection string** for this quickstart.
67
57
68
58
## Before running the sample for the first time
69
59
@@ -72,22 +62,24 @@ You can test the sample locally by opening multiple browser sessions with the UR
72
62
3. Get the `Connection String` and `Endpoint URL` from the Azure portal. For more information on connection strings, see [Create an Azure Communication Services resources](../quickstarts/create-communication-resource.md)
73
63
4. Once you get the `Connection String` and `Endpoint URL`, Add both values to the **Server/appsettings.json** file found under the Chat Hero Sample folder. Input your connection string in the variable: `ResourceConnectionString` and endpoint URL in the variable: `EndpointUrl`.
74
64
75
-
### Local run
76
-
77
-
1. Go to the Chat folder and open the `Chat.csproj` solution in Visual Studio
78
-
2. Run the project. The browser will open at localhost:5000.
65
+
## Local run
79
66
80
-
#### Troubleshooting
67
+
1. Set your connection string in `Server/appsettings.json`
68
+
2. Set your endpoint URL string in `Server/appsettings.json`
69
+
3.`npm run setup` from the root directory
70
+
4.`npm run start` from the root directory
81
71
82
-
- Solution doesn't build, it throws errors during NPM installation/build
83
-
84
-
Clean/rebuild the C# solution
72
+
You can test the sample locally by opening multiple browser sessions with the URL of your chat to simulate a multi-user chat.
85
73
86
74
## Publish the sample to Azure
87
75
88
-
1. Right click on the `Chat` project and select Publish.
89
-
2. Create a new publish profile and select your Azure subscription.
90
-
3. Before publishing, add your connection string with `Edit App Service Settings`, and fill in `ResourceConnectionString` as the key and provide your connection string (copied from appsettings.json) as the value.
76
+
1. Under the root director, run these commands:
77
+
```
78
+
npm run setup
79
+
npm run build
80
+
npm run package
81
+
```
82
+
2. Use the Azure extension and deploy the Chat/dist directory to your app service
91
83
92
84
## Clean up resources
93
85
@@ -110,4 +102,3 @@ For more information, see the following articles:
110
102
-[Redux](https://redux.js.org/) - Client-side state management
111
103
-[FluentUI](https://aka.ms/fluent-ui) - Microsoft powered UI library
112
104
-[React](https://reactjs.org/) - Library for building user interfaces
113
-
-[ASP.NET Core](/aspnet/core/introduction-to-aspnet-core?preserve-view=true&view=aspnetcore-3.1) - Framework for building web applications
0 commit comments