How to run start up command for node js application in windows Azure appservice

Barik, Monalisa 126 Reputation points
2023-01-04T16:12:53.933+00:00

As per our requirement we are implementing Angular universal SSR through devops.We are deploying our code to Azure app service .Our functionality working fine in Linux app service as we are able to run start up command(node index.js) after our app service deployment. We want to execute start up command in windows app service .

Kindly guide us how we can execute startup command in windows app service .

We have refered this https://stackoverflow.com/questions/66179438/how-to-run-startup-command-for-a-nodejs-express-js-project-on-azure but not working for me.

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

2 answers

Sort by: Most helpful
  1. Lex Li (Microsoft) 6,037 Reputation points Microsoft Employee
    2023-01-05T07:56:13.067+00:00

    It is highly recommended that you host Node.js web apps on Linux App Service, but if you really want to host it on App Service Windows, you might consider HttpPlatformHandler.

    I showed the settings from hosting locally on Windows/IIS to hosting on Azure,

    https://halfblood.pro/running-nodejs-web-apps-on-iis-with-httpplatformhandler

    0 comments No comments

  2. Barik, Monalisa 126 Reputation points
    2023-01-06T06:36:40.057+00:00

    We have implemented the above solution and now we are able to get SSR but site not loading properly with below error

    Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "font-src 'self' <URL> data: <URL>".
    Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.
    runtime.js:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.


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.