Cannot GET index.html Azure Linux Web App

后端 未结 3 418
后悔当初
后悔当初 2020-12-10 05:53

We created a Linux Web App in Microsoft Azure. The application is static written with React (html and Javascript). We copied the code into the wwwroot folder, but the applic

3条回答
  •  时光说笑
    2020-12-10 06:27

    Another solution would be to add a file called ecoysystem.config.js right next to your index.html file.

    module.exports = {
      apps: [
        {
          script: "npx serve -s"
        }
      ]
    };
    

    This will tell pm2 to associate all requests to index.html as your app service starts up.

    Very helpful information here: https://burkeholland.github.io/posts/static-site-azure/

提交回复
热议问题