I'll try to be as elaborate as possible. Please let me know if I might miss something.
Starting with the root folder, the structure you have is ideal. Something like this if I'm not wrong
- root
|- FunctionA
|- FunctionB
|- SharedLibraryA
|- SharedLibraryB
and while running them locally, it is fine to use the same storage account or storage emulator.
As for testing them locally, you should be able to run different function apps at different ports to test inter-service communication. Depending on how you are running them, there should be an option for specifying the port.
For example, with func
, you could run func host start --port 7072
. In VSC, you could update .vscode/tasks.json
to include the port by adding --port=7072
to the host start
command like below
---
For running it on Azure, its best to have separate function apps (and storage accounts) to ensure they don't affect each other's performance. From a cost perspective, there should be no difference I believe.
For deploying them, once you have each function app open in separate VSC windows, you can deploy them individually, which takes care of all dependencies as long as the references are setup correctly.