DEV Community

Discussion on: How To Serve Node.js Applications with Nginx on a Raspberry

Collapse
 
recurs1v0 profile image
EPPR

You need to add this on line 3

app.use(express.static('public'))

This is how you specify that a folder called "public" will serve static files.

Assuming you have a folder called "css" inside "public"
you can then access like
raspberrypi.local/css/styles.css