Next.js is my main web server for all APIs. And I like it!
summary
Argues that Next.js can be a full web server for REST/GraphQL, using Next 14 route handlers, middleware (runs on the Edge), Node streams for file streaming, OpenAPI via libraries like next-swagger, validation with Zod/Joi and next-connect for Express‑style middleware; shows a quick internal MVP and a custom-server attempt (Standalone build breaks). Benchmarks with autocannon (40s, 100 concurrency, 10 pipelined) show Fastify: ~28k req/s vs Next’s best ~3k req/s, pages/API routes beat app router by ~60%, and the app router drops ~300 errors in ~75k requests.
AI-written summary · about
chapters (7)
- 0:00The case for using Next.js
- 2:36App router and functionality
- 5:43Validation and architecture
- 7:11Middleware and configuration
- 9:31Legacy and library solutions
- 11:30Internal service implementation
- 16:03Performance benchmarks
related talks
12mNext.js is a backend framework
15mBuilding Isomorphic JavaScript Apps Faster with Next.js
10mEfficiency at scale with Next.js and Supabase
25mHow to build a GraphQL API with Next.js and Vercel
36m1, 2, 3... Fastify!
32mPushing boundaries to the edge
28mMastering Server-Side Development for React Developers
22mDo You Even Need That Express Custom Server Any More?
