webdecorators
v1.2.1
Published
Webdecorators for nice Promise-based Express apps
Downloads
2
Readme
Web decorators
This system provides a way to create express web servers in TypeScript in an OO way.
You can create controllers (classes) and url routes (methods). Then, using parameter decorators, you can retrieve required values for the route, like a path component, a query element, or some service. To return data, you can return from the method with direct value or a promise. Both will result in data being sent to the user.
You can create new decorators that install middleware on the route. This is useful when requiring some kind of authentication.