DEV Community

Ahmed Rakan
Ahmed Rakan

Posted on

Express-style routing in Next.js Handlers with next-edge-router

Tired of verbose Next.js server route handler definitions? I built next-edge-router, a lightweight router that combines the simplicity of Express with the structure of Next.js. It supports middleware, method handlers, and clean composition—perfect for serverless functions.

router.use(authMiddleware)
router.get(getHandler)
router.post(postHandler, validate(...))
export const { GET, POST } = router.export()
Enter fullscreen mode Exit fullscreen mode

Check it out : https://github.com/ARAldhafeeri/next-edge-router

Top comments (0)