ariksman / MoviesAzureFuncApi

Demo API made with Azure Functions v3 using Azure Table storage, CosmosDb and Azure SQL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Introduction

Demo app using Azure functions as an API to fetch movies from third party source.

System components

Getting Started

Install first the azure functions core tools via npm

npm i -g azure-functions-core-tools@3 --unsafe-perm true

Local Azure functions development

Use the command line to start the functions locally by

func start

To test locally with the Azure Storage emulator, you will need the following local.settings.json file to be set up:

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "UseDevelopmentStorage=true",
    "FUNCTIONS_WORKER_RUNTIME": "dotnet",
    "AzureWebJobs.FinnkinoMovieQueryFunction.Disabled": false,
    "AzureWebJobs.GetMovies.Disabled": false
  },
  "ConnectionStrings": {
    "AzureSqlConnectionString": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=FinnkinoMovies;Integrated Security=True;"
  },
  "AzureSqlSettings": {
    "ConnectionString": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=FinnkinoMovies;Integrated Security=True;"
  }
}

Additionally add this to project debug settings as input parameters to ensure CORS is in effect:

host start --build --port 7071 --cors * --pause-on-error

About

Demo API made with Azure Functions v3 using Azure Table storage, CosmosDb and Azure SQL

License:MIT License


Languages

Language:C# 48.6%Language:TypeScript 33.6%Language:JavaScript 9.9%Language:HTML 5.1%Language:CSS 2.7%