Collection of decorators to create typed Next.js API routes, with easy request validation and transformation.
The next-api-decorators package simplifies building serverless functions using classes and decorators within Next.js API routes, inspired by the NestJS framework. By combining the structure of NestJS with the simplicity of Next.js, developers can maintain order and enhance the efficiency of /pages/api codebase.
To install the next-api-decorators package, follow these steps:
The next-api-decorators package offers a structured and efficient approach to building serverless functions in Next.js API routes. By leveraging classes and decorators, developers can benefit from the organization inspired by NestJS while maintaining the simplicity of Next.js. With features like route matching, middlewares, and a variety of decorators, this package provides a robust solution for handling API logic with ease.