I can't seem to get my dashboard.pug file to load both dashboard.css and dashboard.js, even though they are all in the same folder.
I have already set up express.static correctly for the public folder.
const publicpath=path.join(__dirname,'../public');
app.use(express.static(publicpath));
dashboard.pug-
doctype html
html
head
title Dashboard
script(src='/views/dashboard/dashboard.js')
link(rel='stylesheet', href='/views/dashboard/dashboard.css')
body
div .navbar
div .navleft
p Your notes
div .navright
div .dropdown
p Account ▼
div .dropdowncontent
p Settings
p Logout
While dashboard.js loads successfully, dashboard.css is not loading.
folder structure
-public
-views
-dashboard
-dashboard.css
-dashboard.js
-dashboard.pug
-server
-server.js
No errors found