Skip to content

Commit 22db616

Browse files
authored
Fix broken run local for Node.js
Thanks @diberry!
1 parent 6bcc435 commit 22db616

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

articles/azure-functions/create-first-function-azure-developer-cli.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create functions in Azure using the Azure Developer CLI
33
description: "Learn how to use the Azure Developer CLI (azd) to create resources and deploy the local project to a Flex Consumption plan on Azure."
4-
ms.date: 09/04/2024
4+
ms.date: 10/19/2024
55
ms.topic: quickstart
66
zone_pivot_groups: programming-languages-set-functions
77
#Customer intent: As a developer, I need to know how to use the Azure Developer CLI to create and deploy my function code securely to a new function app in the Flex Consumption plan in Azure by using azd templates and the azd up command.
@@ -254,14 +254,21 @@ py -m venv .venv
254254
func start
255255
```
256256
::: zone-end
257-
::: zone pivot="programming-language-java"
257+
::: zone pivot="programming-language-java"
258258
```console
259259
mvn clean package
260260
mvn azure-functions:run
261261
```
262262
::: zone-end
263-
::: zone pivot="programming-language-typescript"
263+
::: zone pivot="programming-language-javascript"
264264
```console
265+
npm install
266+
func start
267+
```
268+
::: zone-end
269+
::: zone pivot="programming-language-typescript"
270+
```console
271+
npm install
265272
npm start
266273
```
267274
::: zone-end
@@ -273,11 +280,16 @@ py -m venv .venv
273280
<http://localhost:7071/api/httpget>
274281

275282
1. From a new terminal or command prompt window, run this `curl` command to send a POST request with a JSON payload to the `httppost` endpoint:
276-
283+
::: zone pivot="programming-language-csharp, programming-language-powershell,programming-language-python,programming-language-javascript"
277284
```console
278285
curl -i http://localhost:7071/api/httppost -H "Content-Type: text/json" -d @testdata.json
279286
```
280-
287+
::: zone-end
288+
::: zone pivot="programming-language-javascript,programming-language-typescript"
289+
```console
290+
curl -i http://localhost:7071/api/httppost -H "Content-Type: text/json" -d "@src/functions/testdata.json"
291+
```
292+
::: zone-end
281293
This command reads JSON payload data from the `testdata.json` project file. You can find examples of both HTTP requests in the `test.http` project file.
282294

283295
1. When you're done, press Ctrl+C in the terminal window to stop the `func.exe` host process.

0 commit comments

Comments
 (0)