+TITLE: Migrating from an Express custom server to Next API routes #+ROAM_ALIAS:
- tags:: next, speaking_at_a_conference[speaking at a conference]]
- Who am I?
- What are Next API routes and how are they different from a custom Express server?
- Three instances where custom express servers have been used
- Database connection
- Authentication **
- How to translate documentation that doesn't know about Next API routes?
- Conclusion
- Middleware
- Response helpers
- Errors
- Dynamic routing
- req
- Cookies
- Query ##Body
- res
- send
- status
- end
- json ##return!
- Benefits of Next API Routes: No configuration Each handler is isolated as a standalone function Easily create dynamic paths with params Can use micro middleware Can decorate the handlers with your own functions Can configure each handler individually Build as lambda functions or in a Node server using micro TypeScript out of the box