Skip to content

Commit daf24fa

Browse files
authored
Merge pull request #191256 from diberry/diberry/0310-app-service-pug
App Service - JS quickstart - replace PUG w/EJS
2 parents ac896c7 + 9efda7a commit daf24fa

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

articles/app-service/quickstart-nodejs.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: 'Quickstart: Create a Node.js web app'
33
description: Deploy your first Node.js Hello World to Azure App Service in minutes.
44
ms.assetid: 582bb3c2-164b-42f5-b081-95bfcb7a502a
55
ms.topic: quickstart
6-
ms.date: 09/14/2021
6+
ms.date: 03/10/2022
77
ms.devlang: javascript
88
ms.custom: mvc, devcenter, seodec18, mode-api
99
#zone_pivot_groups: app-service-ide-oss
@@ -30,7 +30,7 @@ This quickstart configures an App Service app in the **Free** tier and incurs no
3030
:::zone target="docs" pivot="development-environment-cli"
3131

3232
- Have an Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?utm_source=campaign&utm_campaign=vscode-tutorial-app-service-extension&mktingSource=vscode-tutorial-app-service-extension).
33-
- Install [Node.js and npm](https://nodejs.org). Run the command `node --version` to verify that Node.js is installed.
33+
- Install [Node.js LTS and npm](https://nodejs.org). Run the command `node --version` to verify that Node.js is installed.
3434
- Install <a href="/cli/azure/install-azure-cli" target="_blank">Azure CLI</a>, with which you run commands in any shell to provision and configure Azure resources.
3535

3636
::: zone-end
@@ -39,7 +39,7 @@ This quickstart configures an App Service app in the **Free** tier and incurs no
3939
:::zone target="docs" pivot="development-environment-azure-portal"
4040

4141
- Have an Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?utm_source=campaign&utm_campaign=vscode-tutorial-app-service-extension&mktingSource=vscode-tutorial-app-service-extension).
42-
- Install [Node.js and npm](https://nodejs.org). Run the command `node --version` to verify that Node.js is installed.
42+
- Install [Node.js LTS and npm](https://nodejs.org). Run the command `node --version` to verify that Node.js is installed.
4343
- Have a FTP client (for example, [FileZilla](https://filezilla-project.org)), to connect to your app.
4444

4545
::: zone-end
@@ -53,20 +53,19 @@ In this step, you create a starter Node.js application and make sure it runs on
5353
1. Create a simple Node.js application using the [Express Generator](https://expressjs.com/starter/generator.html), which is installed by default with Node.js and NPM.
5454

5555
```bash
56-
npx express-generator myExpressApp --view pug
56+
npx express-generator myExpressApp --view ejs
5757
```
5858

5959
1. Change to the application's directory and install the NPM packages.
6060
6161
```bash
62-
cd myExpressApp
63-
npm install
62+
cd myExpressApp && npm install
6463
```
6564
66-
1. Start the development server.
65+
1. Start the development server with debug information.
6766
6867
```bash
69-
npm start
68+
DEBUG=myexpressapp:* npm start
7069
```
7170
7271
1. In a browser, navigate to `http://localhost:3000`. You should see something like this:
@@ -165,7 +164,7 @@ Before you continue, ensure that you have all the prerequisites installed and co
165164
166165
:::zone target="docs" pivot="development-environment-cli"
167166
168-
In the terminal, make sure you're in the *myExpressApp* directory, and deploy the code in your local folder (*myExpressApp*) using the `az webapp up` command:
167+
In the terminal, make sure you're in the *myExpressApp* directory, and deploy the code in your local folder (*myExpressApp*) using the [az webapp up](/cli/azure/webapp#az-webapp-up) command:
169168

170169
# [Deploy to Linux](#tab/linux)
171170

@@ -283,16 +282,16 @@ Azure App Service supports [**two types of credentials**](deploy-configure-crede
283282

284283
You can deploy changes to this app by making edits in Visual Studio Code, saving your files, and then redeploy to your Azure app. For example:
285284

286-
1. From the sample project, open *views/index.pug* and change
285+
1. From the sample project, open *views/index.ejs* and change
287286

288-
```PUG
289-
p Welcome to #{title}
287+
```html
288+
<p>Welcome to <%= title %></p>
290289
```
291290

292291
to
293292

294-
```PUG
295-
p Welcome to Azure!
293+
```html
294+
<p>Welcome to Azure</p>
296295
```
297296

298297
:::zone target="docs" pivot="development-environment-vscode"
@@ -305,7 +304,7 @@ You can deploy changes to this app by making edits in Visual Studio Code, saving
305304

306305
:::zone target="docs" pivot="development-environment-cli"
307306

308-
2. Save your changes, then redeploy the app using the `az webapp up` command again with no arguments:
307+
2. Save your changes, then redeploy the app using the [az webapp up](/cli/azure/webapp#az-webapp-up) command again with no arguments:
309308

310309
```azurecli
311310
az webapp up
@@ -362,7 +361,7 @@ az webapp log tail
362361
363362
The command uses the resource group name cached in the *.azure/config* file.
364363
365-
You can also include the `--logs` parameter with then `az webapp up` command to automatically open the log stream on deployment.
364+
You can also include the `--logs` parameter with then [az webapp up](/cli/azure/webapp#az-webapp-up) command to automatically open the log stream on deployment.
366365
367366
Refresh the app in the browser to generate console logs, which include messages describing HTTP requests to the app. If no output appears immediately, try again in 30 seconds.
368367

0 commit comments

Comments
 (0)