Routing Controllers

screenshot of Routing Controllers

Create structured, declarative and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and Routing Controllers Framework.

Overview

The routing-controllers package allows the creation of controller classes with methods as actions to handle requests, compatible with express.js or koa.js frameworks.

Features

  • Controller Classes: Create classes with methods as actions for request handling.
  • Express.js and Koa.js Support: Works with both express.js and koa.js frameworks.
  • Routing Configurations: Prefix routes, handle parameters, cookies, headers, sessions, and more.
  • Middleware and Interceptors: Implement global and custom middleware and interceptors.
  • Parameter Decorators: Define custom parameter decorators for actions.
  • Authorization Features: Implement authorization using decorators like @Authorized and @CurrentUser.
  • DI Container: Utilize Dependency Injection container for custom configurations.

Summary

routing-controllers is a versatile package that facilitates the creation of controller classes and methods for handling requests in express.js or koa.js. With support for various configuration options, middleware, interceptors, and custom decorators, it offers a robust solution for implementing route controllers efficiently in Node.js applications.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.