I built a very simple Azure Function in Node.js using Visual Studio Code. I also created a new Function App from the Azure Portal and created a "Staging" deployment Slot. Now I want to deploy my function from Visual Studio Code to this existing Function App and Slot - I can't! I do not find the way to select the Slot, and any deployment will go straight into the default/Production slot.
Is this supported from VS Code? If not, is it possible to do it from VS 2017 (remember that this is a Node.js project) ?
Thanks in advance
Jose
Azure function slot is a preview version. It seems not supported in VS code, after creating a slot in the portal, there will not be a slot option and will be an error in it, like the screenshot. If not, there is normal. May be it's a bug. When deploying, it happens like you mentioned.
In the VS 2017, it works fine, just create the profile and publish your function.
Update:
My function is C#. Currently there is no Node.js function template in VS, but you could create c# function and write the function file with node.js manually and publish to azure function slot.
You could create it like the screenshot below, and set Copy if newer
for the function.json
and index.js
.
Check it in the portal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With