🚧 Documentation is a work in progress, thank you for your patience! 🚧

Running Your Functions Locally

Run Azure Functions on Your Development Machine

In this guide, I will explain how to run your Func Runner flavored Azure Function App on your development machine.

Step 1: Copy Local Settings

You will need to copy over the example local.settings.json to your project folder by running the following command:

cp example.local.settings.json local.settings.json

Important Note - Do not commit settings to version control.

The local.settings.json file is how your function app imports environment settings when running on your localhost. This includes environment variables that may be sensitive in nature and you should not commit them to version control.

For example AzureWebJobsStorage and OPENAI_API_KEY are sensitive values that must be protected at all costs.

Step 2: Add Your Storage Key

To find your AzureWebJobsStorage connection string use the command below making sure yourresource-group and name values are properly set based on your environment. The name value is the same name you used to name your function app when you read the Create Azure Function App guide.

az functionapp config appsettings list --resource-group funcRunnerResourceGroup --name myFuncRunnerApp --query "[?name=='AzureWebJobsStorage'].value" --output tsv

Copy this value to the AzureWebJobsStorage key in your local.settings.json file.

Step 3: Add Your OpenAI API Key

To create an OpenAI API Key, visit the Quickstart tutorial documentation for OpenAI.

Copy your newly created key to the OPENAI_API_KEY key in your local.settings.json file.

Step 4: Run Your Azure Function App Locally

func start

Next Recommended Reading

Learn how to create your first function. Read the Create Your First Function guide.