https://github.com/mborders/restorator
https://github.com/mborders/restorator
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mborders/restorator
- Owner: mborders
- License: mit
- Created: 2017-08-29T13:30:38.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-30T15:28:39.000Z (almost 9 years ago)
- Last Synced: 2025-10-12T14:29:57.471Z (8 months ago)
- Language: TypeScript
- Size: 24.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Restorator
## Description
REST controller/route and dependency injection decorators for Express-based REST applications
## Usage
### @Controller (type: any, path: string)
* Defines a top-level class contrainer for REST methods
* Takes in a type (which is the class being defined) and a path that will prefix all REST methods contained in the class
### @HttpGet (path: string)
* Defines a GET method at the provided path
### @HttpPost (path: string)
* Defines a POST method at the provided path
### @HttpPut (path: string)
* Defines a PUT method at the provided path
### @HttpDelete (path: string)
* Defines a DELETE method at the provided path
### @Inject (type: any)
* Signals that the given class member should be initialized via injection
### HttpContainer
* Provides a single method called register() that takes in the Express router
* All @Http* and @Controller decorators are automatically registered with the router