From b40db23e9c2862a1fc176b179fc1142e65b630c0 Mon Sep 17 00:00:00 2001 From: sinedied Date: Thu, 15 Dec 2022 15:16:52 +0100 Subject: [PATCH] docs: fix documentation regarding --api-devserver-url usage (#579) --- docs/www/docs/cli/swa-start.md | 10 +++++----- docs/www/docs/use/3-api-server.md | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/www/docs/cli/swa-start.md b/docs/www/docs/cli/swa-start.md index 74cff95c..c30b588a 100644 --- a/docs/www/docs/cli/swa-start.md +++ b/docs/www/docs/cli/swa-start.md @@ -51,7 +51,7 @@ Here is a list of the default ports used by some popular dev servers: | [Next.js](https://nextjs.org/) | 3000 | `swa start http://localhost:3000` | | [React (Create React App)](https://reactjs.org/docs/create-a-new-react-app.html) | 3000 | `swa start http://localhost:3000` | | [Svelte (sirv-cli)](https://github.com/lukeed/sirv/tree/master/packages/sirv-cli/) | 5000 | `swa start http://localhost:5000` | -| [Vue](https://github.com/vuejs/create-vue) | 3000 | `swa start http://localhost:3000` | +| [Vue](https://github.com/vuejs/create-vue) | 3000 | `swa start http://localhost:3000` | Instead of starting a dev server separately, you can provide the startup command to the CLI. @@ -94,10 +94,10 @@ When developing your backend locally, sometimes it's useful to run Azure Functio To use the CLI with your local API backend dev server, follow these two steps: 1. Start your API using Azure Functions Core Tools: `func host start` or start debugging in VS Code. -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: +2. In a separate terminal, run the SWA CLI with the `--api-devserver-url` flag and the URI of the local API server, in the following format: ```bash -swa start ./my-dist --api-location http://localhost:7071 +swa start ./my-dist --api-devserver-url http://localhost:7071 ``` ## Options @@ -108,7 +108,7 @@ Here are the options you can use with `swa start`: - `-i, --api-location `: the folder containing the source code of the API application - `-O, --output-location `: the folder containing the built source of the front-end application. The path is relative to `--app-location` (default: ".") - `-D, --app-devserver-url `: connect to the app dev server at this URL instead of using output location -- `-is, --api-devserver-url `: connect to the api server at this URL instead of using output location +- `-is, --api-devserver-url `: connect to the api server at this URL instead of using api location - `-j, --api-port `: the API server port passed to `func start` (default: 7071) - `-q, --host `: the host address to use for the CLI dev server (default: "localhost") - `-p, --port `: the port value to use for the CLI dev server (default: 4280) @@ -157,7 +157,7 @@ swa start http://localhost:3000 --run-build "npm start" Connect both front-end and the API to running development server ```bash -swa start http://localhost:3000 --api-location http://localhost:7071 +swa start http://localhost:3000 --api-devserver-url http://localhost:7071 ``` ## See Also diff --git a/docs/www/docs/use/3-api-server.md b/docs/www/docs/use/3-api-server.md index ed0a0cf2..e4383d9c 100644 --- a/docs/www/docs/use/3-api-server.md +++ b/docs/www/docs/use/3-api-server.md @@ -29,10 +29,10 @@ To use the SWA emulator services alongside the API server: func host start ``` -2. Start SWA CLI in a separate terminal and use the `--api-location` option to pass it the relevant local API Server URI. _For example:_ +2. Start SWA CLI in a separate terminal and use the `--api-devserver-url` option to pass it the relevant local API Server URI. _For example:_ ```bash -swa start ./my-dist --api-location http://localhost:7071 +swa start ./my-dist --api-devserver-url http://localhost:7071 ``` ## 4.3 Start API Server Automatically