Which of the following is required to serve static files in an Express application?

  • express.static()
  • app.static()
  • serveStatic()
  • staticFiles()
In Express.js, the express.static() middleware is used to serve static files like HTML, CSS, and JavaScript files. This middleware is essential to handle static assets in an Express application. The other options are not valid methods for serving static files.
Add your answer
Loading...

Leave a comment

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