This project demonstrates the deployment process of a Blazor WebAssembly application and an ASP.NET Core Web API to Azure. The Blazor WebAssembly app interacts with the ASP.NET Core Web API to perform various functionalities. This README serves as a guide to set up, deploy, and contribute to this project.
- Blazor WebAssembly frontend
- ASP.NET Core Web API backend
- Demonstrates Azure deployment process
- Open source and accepting contributions
Before getting started, ensure you have the following installed:
- .NET SDK
- Visual Studio or Visual Studio Code (optional)
- Azure CLI (for deployment to Azure)
-
Clone this repository to your local machine:
git clone https://github.com/yourusername/your-project.git
-
Navigate to the project directory:
cd your-project -
Build the solution:
dotnet build
-
Run the application locally:
dotnet run
-
Open your web browser and navigate to
https://localhost:5001to view the Blazor WebAssembly app.
To deploy the application to Azure, follow these steps:
-
Log in to Azure CLI:
az login
-
Set the Azure subscription:
az account set --subscription <subscription-id>
-
Navigate to the project directory.
-
Publish the Blazor WebAssembly app:
dotnet publish -c Release
-
Navigate to the publish directory:
cd bin/Release/net5.0/publish -
Create an Azure App Service:
az webapp up --sku F1 --name <app-name> --location <location>
-
Deploy the ASP.NET Core Web API to Azure App Service:
az webapp deploy --name <app-name> --src-path <path-to-api-publish-folder> --type zip
-
Once the deployment is complete, you can access the application at
https://<app-name>.azurewebsites.net.
Contributions are welcome! To contribute to this project, follow these steps:
-
Fork the repository.
-
Create a new branch:
git checkout -b feature/your-feature
-
Make your changes and commit them:
git commit -m "Add your feature" -
Push to the branch:
git push origin feature/your-feature
-
Create a pull request.
This project is licensed under the Apache License 2.0.
For any questions or support, please contact [maintainer's email].