What would happen if you do not use the express.static middleware function for serving static files?

  • Static files would be served by default.
  • You cannot serve static files in Express.js.
  • Express.js would throw an error.
  • Static files would be served but with limited caching.
If you do not use the express.static middleware function to serve static files, Express.js would not be able to serve static files by default. You need this middleware to handle static file requests. The other options are incorrect because Express.js does have the capability to serve static files, but you need to configure it properly.
Add your answer
Loading...

Leave a comment

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