Task: Add reflection metadata for decorators and add basic implements for controller and express application and constants and app
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
13
src/controller/index.controller.ts
Normal file
13
src/controller/index.controller.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Request, Response } from "express"
|
||||
import Controller from "../decorators/controller.decorator"
|
||||
import { Get } from "../decorators/handlers.decorator"
|
||||
|
||||
@Controller("/hello")
|
||||
export default class IndexController {
|
||||
constructor() {}
|
||||
|
||||
@Get("")
|
||||
public index(req: Request, res: Response) {
|
||||
res.send(`Hello Index`)
|
||||
}
|
||||
}
|
||||
3
src/controller/index.ts
Normal file
3
src/controller/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import IndexController from "./index.controller"
|
||||
|
||||
export const controllers = [IndexController]
|
||||
Reference in New Issue
Block a user