So i've run into a problem, where i simply can't get the css to have any effect on my hbs code.
My service has a structure like this:
- Service
- Controllers
- Models
- public
- css
- styles.css
- css
- Routers
- Views
- index.hbs
- app.js
- package.json
- Procfile
- node_modules
- package-lock.json
Now, I want my index.hbs file to use the stylesheet "styles.css" in the public css folder. therefore i put a reference in index.hbs to it with:
link rel="stylesheet" href="../public/css/styles.css">
also, I put app.use(express.static(path.join(__dirname, '/public'))); in my app.js
When I ctrl+click the reference in the hbs (in VSC) it takes me to the right css file, yet it doesn't work when i run the app. Is something wrong with the app routing? i feel like i've tried everything, so appreciate any feedback
- Fred
publicpath because that's already assumed to be where everything is coming from. You should just go/css/styles.cssin yourlink