Reputation: 73
I push my application with Git bash in Openshift nodejs. My sass1.js file is in the js folder. In my index.html file I refer to it as
<script src="./js/sass1.js"></script>
But I get this error in when I look in Firefox
"NetworkError: 404 Not Found - ...js/sass1.js"
Upvotes: 3
Views: 1017
Reputation: 1717
You need to provide static directory to nodejs express app.
app.use(express.static(__dirname+"/yourfolderwherecssisresiding")
Upvotes: 0
Reputation: 2807
You'll want to reference your code locations with the appropriate environment variable. You can also check out https://www.openshift.com/videos/getting-started-with-nodejs-on-openshift for more information on nodejs with openshift.
EDIT
On second thought I think this thread will point you in the right direction https://www.openshift.com/forums/openshift/pictures-css-where-can-i-store-resources.
Upvotes: 3