thaitype / nammatham-v2-azure-functions-file-share-example

Azure Functions with File Share Example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azure Functions with File Share Example

Note: Only support Linux Function App, Windows Container Function App

Doc:

When deploy the Azure Functions can access the fileshare via filesystem

and you can see all files in the file share

Local Dev

Note: This code cannot run on local, please test on Azure.

  1. copy .env.sample to .env
  2. then run local
yarn dev

Run Azure Functions Worker on Local

  1. Prep Azure Functions Config on local, create local.settings.json
{
  "IsEncrypted": false,
  "Values": {
      "FUNCTIONS_WORKER_RUNTIME": "node",
      "AzureWebJobsFeatureFlags": "EnableWorkerIndexing",
      "AzureWebJobsStorage": "UseDevelopmentStorage=true"
      },
  "ConnectionStrings": {}
  }
  1. Run with Azure Functions worker
yarn start

Deploy to Azure functions

  1. Create Azure Functions on Azure via CLI

    export randomIdentifier=$RANDOM$RANDOM
    ./scripts/create-infra.sh $randomIdentifier
  2. Deploy

    ./scripts/deploy.sh $randomIdentifier

Destory

az group delete --name msdocs-azure-functions-rg-$randomIdentifier

About

Azure Functions with File Share Example

License:MIT License


Languages

Language:Shell 68.7%Language:TypeScript 31.3%