call python program from node.js web app in azure (Linux)

Su Myat Hlaing 180 Reputation points
2023-10-01T07:25:47.1966667+00:00

I tested in local env by installing python to call python program from node.js. it is ok.

But when I deploy to node.js web app in azure linux server, do I need to install python.? where do I need to install and which steps should be consider?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,932 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2023-10-02T21:18:56.4633333+00:00

    Hi @Su Myat Hlaing

    I don't think this possible on the out of box experience. You select your language; you're essentially configuring the app service what process the host is going to spin up. There are one or two ways to get around this though:

    1. Configure your python program as a web job and use a webhook to trigger the job from your application. This isn't the preferred way to because web job is only supported on Windows and most recent Python runtimes are not supported on that platform.
    2. Use your own custom container image configured as your local system.
    3. Move the Python app to an Azure Function app with a HTTP trigger and use your app service to call that endpoint.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.