Create structured, declarative, and beautifully organized class-based controllers with heavy decorators usage in Express / Koa using TypeScript and routing controllers framework. Allows creating controller classes with methods as actions that handle requests. You can use routing-controllers with express.js or koa.js. You can return a promise in the controller, and it will wait until promise resolved and return promise result in a response body. You can use framework's request and response objects directly. If you want to handle the response by yourself, just make sure you return the response object itself from the action. If you have, or if you want to create and configure express app separately, you can use useExpressServer instead of createExpressServer function. Express uses express-session / Koa uses koa-session or koa-generic-session to handle session.

Features

  • Loading middlewares and controllers from directories
  • Use middlewares
  • Convert parameters to objects
  • Make parameter required
  • Selectively disable request/response transform
  • Auto validate action params

Project Samples

Project Activity

See All Activity >

Categories

Frameworks

License

MIT License

Follow routing-controllers

routing-controllers Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of routing-controllers!

Additional Project Details

Programming Language

TypeScript

Related Categories

TypeScript Frameworks

Registered

2022-11-17