Как заставить мое развернутое веб-приложение находить мои stati c файлы? - PullRequest
0 голосов
/ 03 мая 2020

У меня есть простое приложение реакции с некоторыми ссылками и целевая страница с видео фоном. Я запустил сборку npm, чтобы создать папку сборки для моего веб-приложения, которое я развернул на Azure. Все работает, кроме моего видео фон не отображается. Другие мои изображения и значки делают.

Я получаю сообщение об ошибке при обнаружении ресурсов. json и моя папка stati c не может быть найдена. Я проверил в Azure, чтобы увидеть, существуют ли эти файлы, и они делают.

Errors im getting in browser

Вот мой web.config. `

 https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config

->

    <!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
    <rule name="StaticContent">
      <action type="Rewrite" url="public{PATH_INFO}"/>
    </rule>

    <!-- All other URLs are mapped to the node.js site entry point -->
    <rule name="DynamicContent">
      <conditions>
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True"/>
      </conditions>
      <action type="Rewrite" url="server.js"/>
    </rule>
  </rules>
</rewrite>

<!-- 'bin' directory has no special meaning in node.js and apps can be placed in it -->
<security>
  <requestFiltering>
    <hiddenSegments>
      <remove segment="bin"/>
    </hiddenSegments>
  </requestFiltering>
</security>

<!-- Make sure error responses are left untouched -->
<httpErrors existingResponse="PassThrough" />

<!--
  You can control how Node is hosted within IIS using the following options:
    * watchedFiles: semi-colon separated list of files that will be watched for changes to restart the server
    * node_env: will be propagated to node as NODE_ENV environment variable
    * debuggingEnabled - controls whether the built-in debugger is enabled

  See https://github.com/tjanczuk/iisnode/blob/master/src/samples/configuration/web.config for a full list of options
-->
<!--<iisnode watchedFiles="web.config;*.js"/>-->
<staticContent>
    <remove fileExtension=".mp4" />
    <mimeMap fileExtension=".mp4" mimeType="video/mp4" />
        <remove fileExtension=".json" />
        <mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>

`

Извините, если мое объяснение плохое, я новичок в azure

...