Skip to content

Commit b4184a3

Browse files
committed
first pass at feedback - easy fixes
1 parent 645a255 commit b4184a3

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

articles/azure-functions/TOC.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@
381381
href: functions-reference-node.md
382382
- name: TypeScript
383383
href: functions-reference-node.md#typescript
384-
- name: Upgrade to v4.x
384+
- name: Upgrade to model v4.x
385385
href: functions-node-upgrade-v4.md
386386
- name: Java
387387
href: functions-reference-java.md

articles/azure-functions/functions-node-upgrade-v4.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
---
2-
title: Upgrade to Azure Functions Node.js programming model v4
2+
title: Upgrade to v4 of the Node.js model for Azure Functions
33
description: This article shows you how to upgrade your existing function apps running on v3 of the Node.js programming model to v4.
44
ms.service: azure-functions
55
ms.date: 03/15/2023
66
ms.devlang: javascript, typescript
77
ms.topic: how-to
88
---
99

10-
# Upgrade to Azure Functions Node.js programming model v4
10+
# Upgrade to version 4 of the Node.js programming model for Azure Functions
1111

1212
The Node.js programming model for Azure Functions defines how you author serverless code in JavaScript or TypeScript. The version of the programming model matches the version of the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions) npm package that should be included with your app. This article discusses the differences between both versions and how to upgrade an existing v3 app. If you want to create a brand new v4 app, see the tutorial for either [VS Code](./create-first-function-cli-node.md) or [Azure Functions Core Tools](./create-first-function-vs-code-node.md).
1313

14-
> [!NOTE]
15-
> v4 of the Node.js programming model is currently in public preview. This version number is _not_ the same thing as the Azure Functions [runtime version](./functions-versions.md), which is coincidentally using "4" as its latest major version. Lastly, you can't mix v3 and v4 of the programming models.
16-
17-
## Motivation
18-
19-
v4 was designed with the following goals in mind:
14+
Version 4 was designed with the following goals in mind:
2015

2116
- Provide a familiar and intuitive experience to Node.js developers
2217
- Make the file structure flexible with support for full customization
2318
- Switch to a code-centric approach for defining function configuration
2419

25-
## Prerequisites
20+
> [!NOTE]
21+
> v4 of the Node.js programming model is currently in public preview. This version number is _not_ the same thing as the Azure Functions [runtime version](./functions-versions.md), which is coincidentally using "4" as its latest major version. Lastly, you can't mix v3 and v4 of the programming models.
22+
23+
## Requirements
2624

27-
Before you start upgrading your app, v4 of the Node.js programming model is only supported with the following minimum versions:
25+
Version 4 of the Node.js programming model requires the following minimum versions:
2826

2927
- [`@azure/functions`](https://www.npmjs.com/package/@azure/functions) npm package v4.0.0-alpha.8+
3028
- [Node.js](https://nodejs.org/en/download/releases/) v18+
@@ -44,7 +42,7 @@ For the first time, the [`@azure/functions`](https://www.npmjs.com/package/@azur
4442
4543
## App entry point
4644
47-
v4 of the programming model lets you structure your code however you want. The only files you need at the root of your app are `host.json` and `package.json`. Otherwise, you define the file structure by setting the `main` field in your `package.json` file. The `main` field can be set to a single file or multiple files by using a [glob pattern](https://wikipedia.org/wiki/Glob_(programming)). Common values for the `main` field may be:
45+
In v4 of the programming model, you can structure your code however you want. The only files you need at the root of your app are `host.json` and `package.json`. Otherwise, you define the file structure by setting the `main` field in your `package.json` file. The `main` field can be set to a single file or multiple files by using a [glob pattern](https://wikipedia.org/wiki/Glob_(programming)). Common values for the `main` field may be:
4846
- TypeScript
4947
- `dist/src/index.js`
5048
- `dist/src/functions/*.js`

articles/azure-functions/functions-reference-node.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ As a JavaScript developer, you might also be interested in one of the following
2323
| -- | -- | -- |
2424
| <ul><li>[Node.js function using Visual Studio Code](./create-first-function-vs-code-node.md)</li><li>[Node.js function with terminal/command prompt](./create-first-function-cli-node.md)</li><li>[Node.js function using the Azure portal](functions-create-function-app-portal.md)</li></ul> | <ul><li>[Developer guide](functions-reference.md)</li><li>[Hosting options](functions-scale.md)</li><li>[TypeScript functions](#typescript)</li><li>[Performance&nbsp; considerations](functions-best-practices.md)</li></ul> | <ul><li>[Create serverless applications](/training/paths/create-serverless-applications/)</li><li>[Refactor Node.js and Express APIs to Serverless APIs](/training/modules/shift-nodejs-express-apis-serverless/)</li></ul> |
2525

26-
## Programming Model
26+
## Programming model
2727

2828
The "programming model" as discussed in this article loosely represents the Node.js layer of Azure Functions. If you are authoring code in JavaScript or TypeScript, the code patterns you use are governed by the programming model. For example, it defines how you register a function, get a function's input, or interact with the invocation context. The programming model version is strictly tied to the version of the [`@azure/functions`](https://www.npmjs.com/package/@azure/functions) npm package and is _not_ the same thing as the Azure Functions [runtime version](./functions-versions.md), even if the major version numbers are coincidentally similar.
2929

3030
> [!NOTE]
3131
> You can only use one major version of the programming model at a time.
3232
33-
### Supported Versions
33+
### Supported versions
3434

3535
The following table shows each version of the Node.js programming model along with its supported versions of the Azure Functions runtime and Node.js.
3636

0 commit comments

Comments
 (0)