OpenShift Nodejs JavaScript 파일 위치
문제
Openshift NodeJS에서 Git Bash로 신청서를 누르십시오. 내 sass1.js 파일은 JS 폴더에 있습니다. 내 index.html 파일에서 i로 참조
<script src="./js/sass1.js"></script>
.
그러나 Firefox
에서 볼 때이 오류가 발생합니다."NetworkError : 404 발견되지 않음 - ... js / sass1.js"
해결책
적절한 환경 변수를 사용하여 코드 위치를 참조 할 필요가 있습니다. https://www.openshift.com/을 확인할 수도 있습니다.OpenShift가있는 NodeJS에 대한 자세한 내용은 비디오 / With-kitring-nodejs-on-openshift .
편집
두 번째 생각 에이 스레드가 올바른 방향으로 당신을 지적 할 것이라고 생각합니다 https://www.openshift.com/forums/openshift/pictures-cssss-where-can-i-store-resources .
다른 팁
nodejs express 앱에 정적 디렉토리를 제공해야합니다.
app.use(express.static(__dirname+"/yourfolderwherecssisresiding")
. 제휴하지 않습니다 StackOverflow