Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Function in Node.js and shared files

I am deploying my Azure Functions through a Bitbucket CI. I am able to reference files from a shared directory in multiple functions which is great.

However, when I try to update my shared code and deploy it by pushing to my master branch, I can see the files being updated in my Kudu console, but my functions themselves still appear to have a reference to the old version of the file... I don't have this problem if I turn off my CI.

Any idea what the problem could be and how to work around this?

like image 494
Schaemelhout Avatar asked Jan 16 '26 23:01

Schaemelhout


1 Answers

You can specify that your custom shared directories should be monitored for changes by adding them to a watchDirectories array in your host.json file:

{
    "watchDirectories": [ "Shared" ]
}

The runtime will then monitor files in those directories for changes, and restart/reload as necessary. Note that monitoring for a top level node_modules directory is configured by default.

like image 124
mathewc Avatar answered Jan 19 '26 18:01

mathewc



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!