Giter Club home page Giter Club logo

collage-backend's Introduction

Introduction

Serverless backend for the Gif-Collage application utilizing Azure Functions, SignalR, EventGrid, CosmosDB, and Blob Storage.

Getting Started

Terraform Setup

Terraform is not required, but makes setting up Azure Services seamless. NOTE: A change in the backend "remote" block in provider.tf may be required. Run the following commands once Terraform Cloud is connected.

terraform workspace new prod # or dev
terraform init
terraform apply

This will run the Terraform IaC to set-up the serverless infrastructure required to run GifCollage.

Prerequisites

Steps to Run App

  1. Install ngrok, then run the following command: ngrok http -host-header=localhost 7071.
  2. Fill out the necessary configurations in local.settings.json using the sample.local.settings.json file as a template.
  3. Run npm install.
  4. Run npm run offline command to run the azure function app locally.
  5. (Optional / Required for File Uploads) Navigate to the Event-Grid System Topic in Azure Portal for the storagifcollage<env> i.e: storagegifcollageprod account. Use this page for creating the event-grid subscription for the local "gifCollageUpload" Function. The steps for setting up can be found in the following wiki provided by Azure: Here. You can use the following guide below to create the new event subscription.
    • Basic tab
      • Event Subscription Name: filesavesub-gifurl-local
      • Event Scheme: "Event Grid Scheme"
      • Filter to Event Types: "Blob Created"
      • Endpoint Type: Webhook
      • Subscriber Endpoint: <ngrok url>/runtime/webhooks/EventGrid?functionName=gifCollageUpload
    • Filters tab
      • Enable Subject Filtering
      • Subject begins with: /blobServices/default/containers/gifcollage/blobs/files/

NOTE: Every time you start ngrok, the HTTPS URL is regenerated and the value changes. Therefore you must create a new Event Subscription each time you expose your function to Azure via ngrok.

Resources

collage-backend's People

Watchers

James Cloos avatar James McCarthy 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.