In NodeJS model v4, azure functions allows you can configure your nodejs project's main
entry point and thus can configure multiple folders.
For folder structure like this
FunctionsProject
| - functions
| | - function1.ts
| | - function2.ts
| - folder1
| | - folder1function1.ts
| | - folder1function2.ts
| - folder2
| | - folder2function1.ts
| | - folder2function2.ts
| - node_modules
| - dist
| - host.json
| - package.json
Your package.json
file contents
{
...
"main": "dist/{index.js,functions/*.js,folder1/*.js,folder2/*.js}",
...
}
See documention here. https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=typescript%2Cwindows%2Cazure-cli&pivots=nodejs-model-v4#registering-a-function