I am facing an issue with my Node.js application running on Express where I am unable to load the CSS file from the stylesheets directory. Whenever I try to request the css, I receive a 503 error. Surprisingly, all my javascript files load without any issues. To troubleshoot, I attempted moving the CSS file into the javascripts folder and updating the href link in the HTML file. However, each time I try to load it, the server crashes and Node.js restarts.
After removing the CSS link from my index.html, the entire site works perfectly but lacks any styling. Interestingly, when running the application locally, the CSS loads fine. The problem seems to occur only on the deployed Openshift instance.
Application structure:
server.js
node_modules/
public/
--index.html
--bower_components/
--stylesheets/
--app.css
--javascripts/
--app.js
server.js code snippet:
[The provided JavaScript code for server.js would be included here]
index.html code snippet:
<!-- Stylesheets -->
<link rel="stylesheet" href="/stylesheets/app.css" type="text/css"/>