Skip to content
Profile icon

DTSMicah

@DTSMicah (0)
Repls
Posts
DTSMicah
DTSMicah
shared a Post
8 months ago
1
How do you put CSS in Node.js?
I was trying to learn Node.js. However, I cannot get any CSS to work in separate HTML files, with , and can't get JavaScript in it either. Any help, p
learningNode
Node.js
SixBeeps
SixBeeps Take a peek at line 7, app.use(express.static('public')); This line marks a folder named public as a static folder. You can only GET something from a server if there's a routing for it (like using app.get in your server code) or if it's marked as static. So, if you want to GET some content, in your case some CSS and JS files, you'll have to make a new folder with those files in it and mark that folder as static. Since you've already marked public as static, I'd recommend just naming the folder8 months ago
DTSMicah
DTSMicah
published a Repl
7 months ago
1
3d runner game :)
3d runner game :)Use arrows to move around. This took quite a while to make :)
#html
#kajam2021
soren
soren this is AWESOME. It's soooo smooth.7 months ago
soren
soren You should keep working on this!!7 months ago