Serving Static Files

To serve static files like HTML, CSS, and JavaScript, use:

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

Create a public directory and put your static files there.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *