HTTP caching for web APIs — Cache-Control headers, ETags, conditional requests,
88
84%
Does it follow best practices?
Impact
100%
25.00xAverage score across 4 eval scenarios
Passed
No known issues
Build the backend API for a blog platform. Authors write articles that are read by many visitors. The platform supports public article browsing and authenticated author features.
Produce a self-contained server.js (or server.ts) file with an Express app that:
GET /api/articles route that returns published articles (support ?tag= filter).GET /api/articles/:slug route that returns a single article by slug.GET /api/articles/:slug/comments route that returns comments for an article.GET /api/me/drafts route (behind auth middleware) that returns the authenticated author's draft articles.POST /api/articles route (behind auth middleware) that creates a new article.PUT /api/articles/:slug route (behind auth middleware) that updates an article.The code should be production-ready and suitable for a content-heavy site with high read traffic.