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/cloud-services/cloud-services-configure-ssl-certificate-portal.md
+5-11Lines changed: 5 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,12 +43,9 @@ Next, you must include information about the certificate in your service definit
43
43
## Step 2: Modify the service definition and configuration files
44
44
Your application must be configured to use the certificate, and an HTTPS endpoint must be added. As a result, the service definition and service configuration files need to be updated.
45
45
46
-
1. In your development environment, open the service definition file
47
-
(CSDEF), add a **Certificates** section within the **WebRole**
48
-
section, and include the following information about the
49
-
certificate (and intermediate certificates):
46
+
1. In your development environment, open the service definition file (CSDEF), add a **Certificates** section within the **WebRole** section, and include the following information about the certificate (and intermediate certificates):
50
47
51
-
```xml
48
+
```xml
52
49
<WebRolename="CertificateTesting"vmsize="Small">
53
50
...
54
51
<Certificates>
@@ -84,7 +81,7 @@ Your application must be configured to use the certificate, and an HTTPS endpoin
84
81
2. In your service definition file, add an **InputEndpoint** element
85
82
within the **Endpoints** section to enable HTTPS:
86
83
87
-
```xml
84
+
```xml
88
85
<WebRolename="CertificateTesting"vmsize="Small">
89
86
...
90
87
<Endpoints>
@@ -99,7 +96,7 @@ Your application must be configured to use the certificate, and an HTTPS endpoin
99
96
the **Sites** section. This element adds an HTTPS binding to map the
100
97
endpoint to your site:
101
98
102
-
```xml
99
+
```xml
103
100
<WebRolename="CertificateTesting"vmsize="Small">
104
101
...
105
102
<Sites>
@@ -120,7 +117,7 @@ Your application must be configured to use the certificate, and an HTTPS endpoin
120
117
value with that of your certificate. The following code sample provides
121
118
details of the **Certificates** section, except for the thumbprint value.
122
119
123
-
```xml
120
+
```xml
124
121
<Rolename="Deployment">
125
122
...
126
123
<Certificates>
@@ -188,6 +185,3 @@ connect to it using HTTPS.
188
185
* Learn how to [deploy a cloud service](cloud-services-how-to-create-deploy-portal.md).
189
186
* Configure a [custom domain name](cloud-services-custom-domain-name-portal.md).
190
187
* [Manage your cloud service](cloud-services-how-to-manage-portal.md).
Copy file name to clipboardExpand all lines: articles/cloud-services/cloud-services-nodejs-chat-app-socketio.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ The following steps create the cloud service project that will host the Socket.I
36
36
1. From the **Start Menu** or **Start Screen**, search for **Windows PowerShell**. Finally, right-click **Windows PowerShell** and select **Run As Administrator**.
37
37
38
38
![Azure PowerShell icon][powershell-menu]
39
+
39
40
2. Create a directory called **c:\\node**.
40
41
41
42
```powershell
@@ -60,20 +61,23 @@ The following steps create the cloud service project that will host the Socket.I
60
61

61
62
62
63
## Download the Chat Example
64
+
63
65
For this project, we will use the chat example from the [Socket.IO
64
66
GitHub repository]. Perform the following steps to download the example
65
67
and add it to the project you previously created.
66
68
67
69
1. Create a local copy of the repository by using the **Clone** button. You may also use the **ZIP** button to download the project.
68
70
69
71

72
+
70
73
2. Navigate the directory structure of the local repository until you arrive at the **examples\\chat**
71
74
directory. Copy the contents of this directory to the
72
75
**C:\\node\\chatapp\\WorkerRole1** directory created earlier.
73
76
74
77
![Explorer, displaying the contents of the examples\\chat directory extracted from the archive][chat-contents]
75
78
76
79
The highlighted items in the screenshot above are the files copied from the **examples\\chat** directory
80
+
77
81
3. In the **C:\\node\\chatapp\\WorkerRole1** directory, delete the **server.js** file, and then rename the **app.js** file to **server.js**. This removes the default **server.js** file created previously by the **Add-AzureNodeWorkerRole** cmdlet and replaces it with the application file from the chat example.
78
82
79
83
### Modify Server.js and Install Modules
@@ -82,6 +86,7 @@ make some minor modifications. Perform the following steps to the
82
86
server.js file:
83
87
84
88
1. Open the **server.js** file in Visual Studio or any text editor.
89
+
85
90
2. Find the **Module dependencies** section at the beginning of server.js and change the line containing **sio = require('..//..//lib//socket.io')** to **sio = require('socket.io')** as shown below:
86
91
87
92
```js
@@ -120,6 +125,7 @@ Azure emulator:
120
125
following:
121
126
122
127
![The output of the npm install command][The-output-of-the-npm-install-command]
128
+
123
129
2. Since this example was originally a part of the Socket.IO GitHub
124
130
repository, and directly referenced the Socket.IO library by
125
131
relative path, Socket.IO was not referenced in the package.json
@@ -130,6 +136,7 @@ Azure emulator:
130
136
```
131
137
132
138
### Test and Deploy
139
+
133
140
1. Launch the emulator by issuing the following command:
134
141
135
142
```powershell
@@ -143,21 +150,22 @@ Azure emulator:
143
150
> Reinstall AzureAuthoringTools v 2.7.1 and AzureComputeEmulator v 2.7 - make sure that version matches.
144
151
145
152
2. Open a browser and navigate to `http://127.0.0.1`.
153
+
146
154
3. When the browser window opens, enter a nickname and then hit enter.
147
155
This will allow you to post messages as a specific nickname. To test
148
156
multi-user functionality, open additional browser windows using the
149
157
same URL and enter different nicknames.
150
158
151
159

160
+
152
161
4. After testing the application, stop the emulator by issuing the
> Be sure to use a unique name, otherwise the publish process will fail. After the deployment has completed, the browser will open and navigate to the deployed service.
168
176
>
169
177
> If you receive an error stating that the provided subscription name doesn't exist in the imported publish profile, you must download and import the publishing profile for your subscription before deploying to Azure. See the **Deploying the Application to Azure** section of [Build and deploy a Node.js application to an Azure Cloud Service](./cloud-services-nodejs-develop-deploy-app.md)
170
-
>
171
-
>
172
178
173
179
![A browser window displaying the service hosted on Azure][completed-app]
174
180
175
181
> [!NOTE]
176
182
> If you receive an error stating that the provided subscription name doesn't exist in the imported publish profile, you must download and import the publishing profile for your subscription before deploying to Azure. See the **Deploying the Application to Azure** section of [Build and deploy a Node.js application to an Azure Cloud Service](./cloud-services-nodejs-develop-deploy-app.md)
177
-
>
178
-
>
179
183
180
184
Your application is now running on Azure, and can relay chat
181
185
messages between different clients using Socket.IO.
182
186
183
187
> [!NOTE]
184
188
> For simplicity, this sample is limited to chatting between users connected to the same instance. This means that if the cloud service creates two worker role instances, users will only be able to chat with others connected to the same worker role instance. To scale the application to work with multiple role instances, you could use a technology like Service Bus to share the Socket.IO store state across instances. For examples, see the Service Bus Queues and Topics usage samples in the [Azure SDK for Node.js GitHub repository](https://github.com/WindowsAzure/azure-sdk-for-node).
185
-
>
186
-
>
187
189
188
190
## Next steps
191
+
189
192
In this tutorial you learned how to create a basic chat application hosted in an Azure Cloud Service. To learn how to host this application in an Azure Website, see [Build a Node.js Chat Application with Socket.IO on an Azure Web Site][chatwebsite].
190
193
191
194
For more information, see also the [Node.js Developer Center](/azure/developer/javascript/).
@@ -206,7 +209,6 @@ For more information, see also the [Node.js Developer Center](/azure/developer/j
0 commit comments