GithubHelp home page GithubHelp logo

isabella232 / functions-js-spa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure-samples/functions-js-spa

0.0 0.0 0.0 64 KB

Azure Functions sample that hosts a SPA in Azure Storage and uses proxies to change page content.

License: MIT License

PowerShell 62.46% HTML 21.79% JavaScript 15.75%

functions-js-spa's Introduction

services platforms author
functions
javascript
lindydonna

Azure Functions Proxies Sample

This sample demonstrates a simple single page application that is hosted on Azure Storage. The site returns a different Azure Functions logo whenever the site is refreshed. The SPA calls APIs that are served from Azure Functions. Proxies are used to route the site root to the SPA and also provide access to the GetFunctionLogo function.

Setup steps

  1. Create a new public container in an Azure Storage account. Copy the files in the ContentFiles folder to this container.

  2. Add a CORS setting for your storage account:

    • Add a CORS rule for your storage account domain name
    • OR delete all CORS rules in the Function App, and add a rule for *.
  3. Deploy to Azure

    Deploy to Azure

    • For the storageUrlAndContainer parameter, use the path to your storage account, including the container name, such as https://accountname.blob.core.windows.net/ContentFiles.
    • For repoUrl, use either https://github.com/Azure-Samples/functions-js-spa or URL of your fork of the sample.

Navigate to the root of your Function App (https://yourappname.azurewebsites.net/), and you will see the HTML page that is hosted on Azure Storage.

Next steps

To learn more about Azure Functions Proxies, see the following:

functions-js-spa's People

Contributors

lindydonna 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.