Skip to content

Commit d3c30b7

Browse files
verify content against latest VS Code extension
1 parent b0ab2de commit d3c30b7

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

articles/static-web-apps/add-api.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
title: Add an API to Azure Static Web Apps with Azure Functions
33
description: Get started with Azure Static Web Apps by adding a Serverless API to your static web app using Azure Functions.
44
services: static-web-apps
5-
author: manekinekko
5+
author: craigshoemaker
66
ms.service: static-web-apps
77
ms.topic: how-to
8-
ms.date: 12/03/2021
9-
ms.author: wachegha
8+
ms.date: 08/29/2022
9+
ms.author: cshoe
1010
ms.custom: devx-track-js
1111
---
1212

@@ -117,7 +117,7 @@ Update the content of the _src/index.html_ file with the following code to fetch
117117
(async function() {
118118
const { text } = await( await fetch(`/api/message`)).json();
119119
document.querySelector('#name').textContent = text;
120-
}())
120+
}());
121121
</script>
122122
</body>
123123
@@ -221,15 +221,9 @@ To run your frontend app and API together locally, Azure Static Web Apps provide
221221

222222
Ensure you have the necessary command line tools installed.
223223

224-
1. Install Azure Static Web Apps CLI.
225-
```bash
226-
npm install -g @azure/static-web-apps-cli
227-
```
228-
229-
1. Install Azure Functions Core Tools V3.
230-
```bash
231-
npm install -g azure-functions-core-tools@3
232-
```
224+
```bash
225+
npm install -g @azure/static-web-apps-cli
226+
```
233227

234228
### Build frontend app
235229

@@ -277,7 +271,7 @@ Run the frontend app and API together by starting the app with the Static Web Ap
277271
# [No Framework](#tab/vanilla-javascript)
278272

279273
Pass the current folder (`src`) and the API folder (`api`) to the CLI.
280-
274+
281275
```bash
282276
swa start src --api-location api
283277
```
@@ -308,7 +302,7 @@ Run the frontend app and API together by starting the app with the Static Web Ap
308302

309303
---
310304

311-
1. When the CLI processes start, access your app at `http://localhost:4280/`. Notice how the page calls the API and displays its output, `Hello from the API`.
305+
1. When the CLI processes start, access your app at [http://localhost:4280/](http://localhost:4280/). Notice how the page calls the API and displays its output, `Hello from the API`.
312306

313307
1. To stop the CLI, type <kbd>Ctrl + C</kbd>.
314308

@@ -329,7 +323,7 @@ To publish changes to your static web app in Azure, commit and push your code to
329323

330324
1. Select the **Git: Commit All** command.
331325

332-
1. When prompted for a commit message, enter **add API** and commit all changes to your local git repository.
326+
1. When prompted for a commit message, enter **feat: add API** and commit all changes to your local git repository.
333327

334328
1. Press <kbd>F1</kbd> to open the Command Palette.
335329

0 commit comments

Comments
 (0)