Ask coding questions

← Back to all posts
how to make css work in node.js
kbadrinath_tcsp (200)

So i've been working on this node.js project, after looking at tutorials online and have made the server. However, when trying to use my original website and put it into this node.js project, my html is not able to use the style.css file. Can someone tell me why, and how to fix it?

Commentshotnewtop
TheForArkLD (610)
app.get('/path/to/file',(req,res)=>{
res.sendfile(path.join(/*idk here*/))
})
kbadrinath_tcsp (200)

I got everything worked out, thanks for the answer though. @TheForArkLD

TheForArkLD (610)

@kbadrinath_tcsp ok
or make these file in HTML project