1

I have a simple Node.js function app that I built using Azure Functions Core Tools. The app was built with two commands func init and func new. The app uses TypeScript and that seems to be key--the problem I am running into does not reproduce if I use JavaScript.

When I use curl and the zipdeploy end point to deploy to a function app that I created using Linux Consumption, the single Http Trigger function in my app is not recognized.

If use curl+zipdeploy to deploy to an app in the same RG using the Premium plan, the function in my app is recognized.

If I use Azure Function Core Tools to deploy the .zip to the Linux Consumption app (i.e. using az functionapp deployment source config-zip...), the Http Trigger function is recognized as well.

I'm using the same .zip in all three cases.

Do I need to do something special to get a Node.js function app using TypeScript to deploy via zipdeploy to a function app using the Consumption plan?

1 Answer 1

0

I have created a function app with runtime stack node.js and a Linux consumption plan.

enter image description here

I created a http trigger function with typescript runtimestack.
npm install typescript ts-node @types/node and npx tsc --init packages have been installed.
The function was executed successfully. check below:

enter image description here

Thanks @Andrew miller for this. First, I zipped the project folder.
I uploaded the zip folder in Azure PowerShell, and by using the command az functionapp deployment source config-zip -g your-resource-group -n nodetype --src newtype1.zip, I was able to deploy to the function app.

Output:

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

As I mentioned in the original post, az functionapp deployment... works for me as well. But trying to post the ZIP using the /zipdeploy API does not.
by referring this SO using Linux consumption plan curl zip deploy is not possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.