In #1611, we added API allowing app developers to serve static assets from their applications. To merge the pull request sooner, we have intentionally accepted a design with suboptimal performance:
- All serve-static middleware is mounted before API routes, violating the best practices.
- Users are forbidden to mount static content at root
/ to avoid the biggest performance penalty.
Let's rethink the way how static files are served, follow the best practices and get the best performance.
See also #559
Acceptance criteria
In #1611, we added API allowing app developers to serve static assets from their applications. To merge the pull request sooner, we have intentionally accepted a design with suboptimal performance:
/to avoid the biggest performance penalty.Let's rethink the way how static files are served, follow the best practices and get the best performance.
See also #559
Acceptance criteria
serve-staticmiddleware is invoked only after no other route (an API endpoint, an Express-like route) matched the request/