I managed to create a new app on Openshift and the basic template that they provided me with is working. The only thing I added to it is:
<head>
...
<link href="styles.css" rel="stylesheet">
</head>
and a file styles.css in the same directory as index.html. In the css file I just changed the footer to red. When I click on index.html my browser shows the changes, but when I upload the files to Openshift nothing changes and I get:
GET http://bgl-boardgamelab.rhcloud.com/styles.css 404 (Not Found)
I think I'm making some silly mistake, but can't figure what it is.
Turns out I had to add the following to my .initializeServer function to serve all my static files:
self.app.use(express.static(__dirname));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With