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

This commit is contained in:
2021-09-14 09:06:03 +07:00
parent a6546b7676
commit 67c94211e7
13 changed files with 148 additions and 46 deletions

View 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
View File

@@ -0,0 +1,3 @@
import IndexController from "./index.controller"
export const controllers = [IndexController]