Azure: "You do not have permission to view this directory or page

前端 未结 7 2224
我寻月下人不归
我寻月下人不归 2021-01-04 23:37

I have created a node.js application in Visual Studio 2015 using the Azure SDK 2.7 and the Node.js Tools.

I have successfully set up CI with BitBucket in my web app

相关标签:
7条回答
  • 2021-01-05 00:24

    I had the same issue,

    you need web.config, package.json, server.js at the root

    web.config:

    <configuration>
        <system.webServer>
            <handlers>
                <!-- indicates that the app.js file is a node.js application to be handled by the iisnode module -->
                <add name="iisnode" path="server.js" verb="*" modules="iisnode" />
            </handlers>
            </system.webServer>
    </configuration>
    

    in package.json you need to have:

     ...
      "scripts": {
        "start": "node server"
      },
    ...
    

    and in your server.js make sure that you set the server port number to

    process.env.PORT || 1337;

    0 讨论(0)
提交回复
热议问题