Giter Site home page Giter Site logo

aswa-blazor-template's Introduction

Azure Static Web Sites Starter App using Blazor and Azure Functions

This template contains an example Blazor WebAssembly client application, a C# Azure Functions and a C# class library with shared code.

This template adds authentication to the quickstart guide

It leverages methods from this blog post from Anthony Chu

It also setups up Dependency Injection for Azure Functions.

Getting Started

Create a repository from the GitHub template and then clone it locally to your machine.

Once you clone the project, open the solution in Visual Studio and press F5 to launch both the client application and the Functions API app.

Note: If you're using the Azure Functions CLI tools, refer to the documentation on how to enable CORS.

Security Setup

For local development there is a file that contains an example claim.

The application leverages two main roles admin and user.
You will need to set this up in the Azure Static Web Site in the Azure Portal, when inviting users.

These roles get mapped to two policies(Admin, User) that are specified in a static class and can be used within the Client Project

Template Structure

  • Client: The Blazor WebAssembly sample application
  • API: A C# Azure Functions API, which the Blazor application will call
  • Shared: A C# class library with a shared data model between the Blazor and Functions application

Deploy to Azure Static Web Apps

This application can be deployed to Azure Static Web Apps, to learn how, check out our quickstart guide.

aswa-blazor-template's People

Contributors

two4suited avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.