app/v3/cosmosDBTrigger/index.ts (8 lines of code) (raw):

// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. import { AzureFunction, Context } from '@azure/functions'; const cosmosDBTrigger: AzureFunction = async function (context: Context, documents: any[]): Promise<void> { context.log(`cosmosDBTrigger processed ${documents.length} documents`); for (const document of documents) { context.log(`cosmosDBTrigger was triggered by "${document.testData}"`); } }; export default cosmosDBTrigger;