Complete the code to serve static files from the 'public' folder using Express.
app.use(express.[1]('public'));
The express.static middleware serves static files like images, CSS, and JavaScript from a folder.
Complete the code to set up Express to serve static files from a folder named 'assets'.
app.use(express.static('[1]'));
The folder name passed to express.static is where your static files live. Here, it's 'assets'.
Fix the error in the code to correctly serve static files from the 'static' folder.
app.use(express.[1]('static'));
The correct middleware to serve static files is express.static. Using others causes errors or wrong behavior.
Fill both blanks to serve static files from 'public' folder and mount it at '/static' URL path.
app.use('[1]', express.[2]('public'));
Mounting static files at '/static' means URLs start with '/static'. The middleware is express.static.
Fill all three blanks to create a static server with Express that serves files from 'assets' folder at '/files' URL path and logs a message when server starts.
app.use('[1]', express.[2]('[3]')); app.listen(3000, () => { console.log('Server running on port 3000'); });
To serve static files from 'assets' at '/files', use app.use('/files', express.static('assets')). The server logs a message on start.