Function App Node.js Windows

Rahul 21 Reputation points
2022-03-30T05:38:42.627+00:00

Hey, so I'm working on a CSPM code where I have to check if the function app is using the latest version of node.js. Now when it is a linux function app, the json data returns "linuxFxVersion":"Node|16"

But for a windows app, there is no proof that node.js is used, how do I find it? Seems impossible. Here's the screenshot of a windows function app.
188149-capture.jpg

What do I do? I can't write the code without finding this out.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,408 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,176 Reputation points MVP
    2022-03-30T09:00:45.797+00:00

    Hello @Rahul

    By default, function apps created in the Azure portal and by the Azure CLI are set to version runtime 3.x. You can modify this version as needed.
    The following table indicates which programming languages are currently supported in each runtime version.
    188314-image.png

    You can see the current version of Node.js that the runtime is using by logging process.version from any function.
    The following table shows current supported Node.js versions for each major version of the Functions runtime, by operating system:
    188341-image.png

    For Windows function apps, target the version in Azure by setting the WEBSITE_NODE_DEFAULT_VERSION app setting to a supported LTS version, such as ~14.

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=v2-v3-v4-export%2Cv2-v3-v4-done%2Cv2%2Cv2-log-custom-telemetry%2Cv2-accessing-request-and-response%2Cwindows-setting-the-node-version#node-version

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-versions?tabs=in-process%2Cv4&pivots=programming-language-javascript

    0 comments No comments