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.
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.
Leave a Reply