@@ -88,13 +88,13 @@ directCommands:
88
88
89
89
By default, the CLI starts and serves any static content from the current working directory `./`:
90
90
91
- ```bash
91
+ ```azstatic-cli
92
92
swa start
93
93
```
94
94
95
95
If the artifact folder of your static app is under a different folder (for example, `./my-dist`), then run the CLI and provide that folder:
96
96
97
- ```bash
97
+ ```azstatic-cli
98
98
swa start ./my-dist
99
99
```
100
100
@@ -108,7 +108,7 @@ directCommands:
108
108
109
109
1. In a separate terminal, run `swa start` with the URI provided by the dev server, in the following format:
110
110
111
- ```bash
111
+ ```azstatic-cli
112
112
swa start http://<APP_DEV_SERVER_HOST>:<APP_DEV_SERVER_PORT>
113
113
```
114
114
@@ -127,7 +127,7 @@ directCommands:
127
127
128
128
Instead of starting a dev server separately, you can provide the startup command to the CLI.
129
129
130
- ```bash
130
+ ```azstatic-cli
131
131
# npm start script (React)
132
132
swa start http://localhost:3000 --run "npm start"
133
133
@@ -151,7 +151,7 @@ directCommands:
151
151
152
152
Run the CLI and provide the folder that contains the API backend (a valid Azure Functions App project):
153
153
154
- ```bash
154
+ ```azstatic-cli
155
155
# static content plus an API
156
156
swa start ./my-dist --api-location ./api
157
157
@@ -169,7 +169,7 @@ directCommands:
169
169
170
170
2. In a separate terminal, run the SWA CLI with the `--api-location` flag and the URI of the local API server, in the following format:
171
171
172
- ```bash
172
+ ```azstatic-cli
173
173
swa start ./my-dist --api-location http://localhost:7071
174
174
```
175
175
syntax : >-
@@ -270,13 +270,13 @@ directCommands:
270
270
271
271
- If you are using the [Azure CLI](https://aka.ms/azcli), you can get the deployment token of your project using the following command:
272
272
273
- ```bash
273
+ ```azstatic-cli
274
274
az staticwebapp secrets list --name <APPLICATION_NAME> --query "properties.apiKey"
275
275
```
276
276
277
277
- If you are using the Azure Static Web Apps CLI, you can use the following command:
278
278
279
- ```bash
279
+ ```azstatic-cli
280
280
swa deploy --print-token
281
281
```
282
282
@@ -292,7 +292,7 @@ directCommands:
292
292
<br><br>
293
293
**Option 1:** From build folder you would like to deploy, run the deploy command:
294
294
295
- ```bash
295
+ ```azstatic-cli
296
296
cd build/
297
297
swa deploy
298
298
```
@@ -305,7 +305,7 @@ directCommands:
305
305
306
306
2. Deploy your app:
307
307
308
- ```bash
308
+ ```azstatic-cli
309
309
swa deploy ./my-dist
310
310
```
311
311
@@ -329,7 +329,7 @@ directCommands:
329
329
330
330
1. Deploy your app:
331
331
332
- ```bash
332
+ ```azstatic-cli
333
333
swa deploy ./my-dist --api-location ./api
334
334
```
335
335
@@ -339,13 +339,13 @@ directCommands:
339
339
340
340
1. Build your Blazor app in **Release** mode:
341
341
342
- ```bash
342
+ ```azstatic-cli
343
343
dotnet publish -c Release -o bin/publish
344
344
```
345
345
346
346
2. From the root of your project, run the `deploy` command:
347
347
348
- ```bash
348
+ ```azstatic-cli
349
349
swa deploy ./bin/publish/wwwroot --api-location ./Api
350
350
```
351
351
@@ -379,13 +379,13 @@ directCommands:
379
379
380
380
2. Deploy your app:
381
381
382
- ```bash
382
+ ```azstatic-cli
383
383
swa deploy
384
384
```
385
385
386
386
If you have multiple configuration entries, you can provide the entry ID to specify which one to use:
387
387
388
- ```bash
388
+ ```azstatic-cli
389
389
swa deploy my-otherapp
390
390
```
391
391
0 commit comments