The app in this repo streams a large file (96mb by default) named input.txt
to a file output.txt
and logs the progress.
Add a local.settings.json
file with the following contents:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "",
"FUNCTIONS_WORKER_RUNTIME": "node",
"FUNCTIONS_REQUEST_BODY_SIZE_LIMIT": "4294967296"
}
}
Run npm install
.
Run npm start
. This will build the app, create the large input file, and start the app.
Leave the previous terminal running and open a new terminal to execute a function.
npm run streamRequest
.npm run streamResponse
.You should see progress in the console as the file is processed. It happens fast for a 96mb file, but as long as you see a chunk count greater than 1, you know your data was streamed.
src/functions/*
: The actual functions for your appsrc/scripts/*
: Scripts used to create the large file and send requests to Azure Functionssrc/constants.ts
: A file with several settings that you can change to modify the behavior of the app.fileSize
in src/constants.ts
to a larger value (the max as defined in local.settings.json
above is 4 GB).