I want to generate Functions code (C# or NodeJS) based on business rules I have in a database and replace the Function so that it is compiled and picked up the next time the Function is invoked.
What could be the approach?
kudu
and write the Functions to the "file system"Using the Kudu VFS (File System) or ZIP APIs will be the most straight forward approach, I would recommend the latter.
There are no host APIs for function creation/management today, so that is not a viable option.
Another option, which depending on your requirements and logic, might be a better fit, is to have a function that creates those files for you. Just need to be careful to make sure you don't have delays in file writes, causing the runtime to process those files before you're done.