Prefer use of Azure Static Web App CLI (simulator)
DuAell opened this issue · 0 comments
DuAell commented
Whilst the solution given by @anthonychu is awesome, there is a new way of simulating Static Web App environment for local development : https://docs.microsoft.com/en-us/azure/static-web-apps/local-development
Install it : npm install -g @azure/static-web-apps-cli
Create a swa-cli.config.json file in the root folder and paste inside :
{
"$schema": "https://raw.githubusercontent.com/Azure/static-web-apps-cli/main/schema/swa-cli.config.schema.json",
"configurations": {
"app": {
"context": "https://localhost:7229",
"apiLocation": "https://localhost:7071",
"swaConfigLocation": "Client/wwwroot"
}
}
}
Then launch swa start
from the root folder
Your Blazor app should be used from http://localhost:4280/ and will use the simulator for authentication.