Я новичок в React
Я создал службу приложения узла в портале Azure с помощью веб-приложения Node JS Empty web App Starter.
Когда я захожу по URL-адресу, я вижу
Hello, world!
Что я отмечу в содержимом server.js
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end('Hello, world!');
}).listen(process.env.PORT || 8080);
Я вижу, что web.config ссылается на server.js
<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>
<rewrite>
<rules>
<!-- Don't interfere with requests for logs -->
<rule name="LogFile" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^[a-zA-Z0-9_\-]+\.js\.logs\/\d+\.txt$" />
</rule>
<!-- Don't interfere with requests for node-inspector debugging -->
<rule name="NodeInspector" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^server.js\/debug[\/]?" />
</rule>
<!-- First we consider whether the incoming URL matches a physical file in the /public folder -->
<rule name="StaticContent">
<action type="Rewrite" url="public{REQUEST_URI}" />
</rule>
<!-- All other URLs are mapped to the Node.js application entry point -->
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="True" />
</conditions>
<action type="Rewrite" url="server.js" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
КогдаЯ размещаю на сайте файлы статического реагирующего веб-сайта, я вижу, что файлы есть, но сам веб-сайт не изменяется, когда я перехожу по URL.
Я думаю, что мне нужно, чтобы веб-сайт запустилсяsrc \ app.js вместо server.js
Как мне это сделать?
Я попытался заменить server.js на ./src/App.js, но затем App.js просто отображаеткак текст.