Super new to web development, so please forgive the stupidity of this question.
I need to serve the contents of a directory called ‘public’ for a site I’m building. Standard stuff in it, just CSS right now actually.
I’m using node and express. I have the ‘serve-static’ and ‘path’ modules (which are necessary for this…?), and it seems like I’m using them correctly. But the styles aren’t being applied. At this juncture I don’t know if it’s because the directory isn’t being served or (more embarrassingly) because I have the file path wrong.
This is how I’m attempting to serve the folder in my app.js:
var serveStatic = require(‘serve-static’);
var path = require(‘path’);
This is how I’m attempting to include it in a header ejs file:
< link rel=“stylesheet” type="/public/styles/landing.css" >
Thanks in advance. I’m loving C9 so far.