Azure Static Web Apps allows you to easily build React apps in minutes. Use this repo with the React quickstart to build and customize a new static site.
This project was bootstrapped with Create React App.
-
Install the Azure Static Web Apps Cli -
npm install -g @azure/static-web-apps-cli
(more info - https://github.com/Azure/static-web-apps-cli) -
Run function app through debugging in vscode or Visual Studio or on command line
func start
-
In root of the repository run the following command
swa start http://localhost:3000 --run "npm start" --api http://localhost:7071/api
This will start the react application on the standard port as well as point the web app to where the function app is running.
-
Should be able to access the application now running under the Azure Static Web App port -
http://localhost:4280
-
On logging in the example will make a request to
/api/TestGet
and can then be debugged and should have access to the logged in user.