Azure 웹 사이트에 node.js/express 앱을 배포 할 때 브라우저에서 "GET /"오류가 발생합니다. 동일한 응용 프로그램이 로컬 컴퓨터에서 완벽하게 실행됩니다.Azure 웹 사이트 + node.js - GET/
web.config
때문에, (나는 단지 정적 재 작성 규칙을 제거) 표준 :
<!-- 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="src/server/app.js"/>
</rule>
</rules>
코드는 src/server/
(노드 기능) 및 src/client/
(정적 컨텐츠) 폴더에 배포됩니다. FREB 당으로
는 SRC/서버/apps.js가 페치 기록했지만 결국 다음과 같은 오류가 발생합니다 : app.js
내부
ErrorCode The system cannot find the file specified. (0x80070002)
I가 정적 파일에 대한 다음과 같은 구성 :
app.use(express.static('./src/client/'));
다른 해결책은 시작 스크립트를 src/server /에서 wwwroot/folder로 이동하는 것입니다. 이 경우 하나의 파일 만 변경하면됩니다. –