Skip to content

Commit b7b74e0

Browse files
committed
updates
1 parent 90086f9 commit b7b74e0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/app-service/configure-language-nodejs.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ zone_pivot_groups: app-service-platform-windows-linux
1313

1414
# Configure a Node.js app for Azure App Service
1515

16-
Node.js apps must be deployed with all the required NPM dependencies. The App Service deployment engine automatically runs `npm install --production` for you when you deploy a [Git repository](deploy-local-git.md), or a [Zip package](deploy-zip.md) [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy). If you deploy your files using [FTP/S](deploy-ftp.md), however, you need to upload the required packages manually.
16+
Node.js apps must be deployed with all the required NPM dependencies. The App Service deployment engine automatically runs `npm install --production` for you when you deploy a [Git repository](deploy-local-git.md), or when you deploy a [Zip package](deploy-zip.md) [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy). If you deploy your files using [FTP/S](deploy-ftp.md), however, you need to upload the required packages manually.
1717

1818
This guide provides key concepts and instructions for Node.js developers who deploy to App Service. If you've never used Azure App Service, follow the [Node.js quickstart](quickstart-nodejs.md) and [Node.js with MongoDB tutorial](tutorial-nodejs-mongodb-app.md) first.
1919

@@ -120,7 +120,7 @@ app.listen(port, () => {
120120

121121
## Customize build automation
122122

123-
If you deploy your app using Git, or zip packages [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy), the App Service build automation steps through the following sequence:
123+
If you deploy your app by using Git, or by using zip packages [with build automation enabled](deploy-zip.md#enable-build-automation-for-zip-deploy), the App Service build automation steps through the following sequence:
124124

125125
1. Run custom script if specified by `PRE_BUILD_SCRIPT_PATH`.
126126
1. Run `npm install` without any flags, which includes npm `preinstall` and `postinstall` scripts and also installs `devDependencies`.
@@ -129,7 +129,7 @@ If you deploy your app using Git, or zip packages [with build automation enabled
129129
1. Run custom script if specified by `POST_BUILD_SCRIPT_PATH`.
130130

131131
> [!NOTE]
132-
> As described in [npm docs](https://docs.npmjs.com/misc/scripts), scripts named `prebuild` and `postbuild` run before and after `build`, respectively, if specified. `preinstall` and `postinstall` run before and after `install`, respectively.
132+
> As is noted in the [npm docs](https://docs.npmjs.com/misc/scripts), scripts named `prebuild` and `postbuild` run before and after `build`, respectively, if specified. `preinstall` and `postinstall` run before and after `install`, respectively.
133133
134134
`PRE_BUILD_COMMAND` and `POST_BUILD_COMMAND` are environment variables that are empty by default. To run pre-build commands, define `PRE_BUILD_COMMAND`. To run post-build commands, define `POST_BUILD_COMMAND`.
135135

@@ -140,19 +140,19 @@ az webapp config appsettings set --name <app-name> --resource-group <resource-gr
140140
az webapp config appsettings set --name <app-name> --resource-group <resource-group-name> --settings POST_BUILD_COMMAND="echo foo, scripts/postbuild.sh"
141141
```
142142

143-
For additional environment variables to customize build automation, see [Oryx configuration](https://github.com/microsoft/Oryx/blob/master/doc/configuration.md).
143+
For information about additional environment variables to customize build automation, see [Oryx configuration](https://github.com/microsoft/Oryx/blob/master/doc/configuration.md).
144144

145145
For more information on how App Service runs and builds Node.js apps in Linux, see [Oryx documentation: How Node.js apps are detected and built](https://github.com/microsoft/Oryx/blob/master/doc/runtimes/nodejs.md).
146146

147147
## Configure Node.js server
148148

149-
The Node.js containers come with [PM2](https://pm2.keymetrics.io/), a production process manager. You can configure your app to start with PM2, or with NPM, or with a custom command.
149+
The Node.js containers come with [PM2](https://pm2.keymetrics.io/), a production process manager. You can configure your app to start with PM2, with npm start, or with a custom command.
150150

151151
|Tool|Purpose|
152152
|--|--|
153153
|[Run with PM2](#run-with-pm2)|**Recommended** - Production or staging use. PM2 provides a full-service app management platform.|
154-
|[Run npm start](#run-npm-start)|Development use only.|
155-
|[Run custom command](#run-custom-command)|Either development or staging.|
154+
|[Run with npm start](#run-with-npm-start)|Development use only.|
155+
|[Run with a custom command](#run-with-a-custom-command)|Either development or staging.|
156156

157157
### Run with PM2
158158

@@ -179,15 +179,15 @@ To add a custom start file, run the following command in the [Cloud Shell](https
179179
az webapp config set --resource-group <resource-group-name> --name <app-name> --startup-file "<filename-with-extension>"
180180
```
181181

182-
### Run custom command
182+
### Run with a custom command
183183

184184
App Service can start your app using a custom command, such as an executable like *run.sh*. For example, to run `npm run start:prod`, run the following command in the [Cloud Shell](https://shell.azure.com):
185185

186186
```azurecli-interactive
187187
az webapp config set --resource-group <resource-group-name> --name <app-name> --startup-file "npm run start:prod"
188188
```
189189

190-
### Run npm start
190+
### Run with npm start
191191

192192
To start your app using `npm start`, just make sure a `start` script is in the *package.json* file. For example:
193193

@@ -321,7 +321,7 @@ fi
321321

322322
In App Service, [TLS/SSL termination](https://wikipedia.org/wiki/TLS_termination_proxy) happens at the network load balancers, so all HTTPS requests reach your app as unencrypted HTTP requests. If your app logic needs to check if the user requests are encrypted, inspect the `X-Forwarded-Proto` header.
323323

324-
Popular web frameworks let you access the `X-Forwarded-*` information in your standard app pattern. In [Express](https://expressjs.com/), you can use [trust proxies](https://expressjs.com/guide/behind-proxies.html). For example:
324+
Popular web frameworks let you access the `X-Forwarded-*` information in your standard app pattern. In [Express](https://expressjs.com/), you can use [trust proxies](https://expressjs.com/en/guide/behind-proxies.html). For example:
325325

326326
```javascript
327327
app.set('trust proxy', 1)

0 commit comments

Comments
 (0)