1.1.3 • Published 4 years ago

@express.ts/router v1.1.3

Weekly downloads
9
License
ISC
Repository
github
Last release
4 years ago

@express.ts/router

A simple router to make it easy to use with Typescript for building efficient and scalable server-side applications, heavily inspired by Spring MVC.

import { RequestMapping, GetMapping, RequestMethod } from "@express.ts/router";
import { Controller, Request, Response, RequestParam } from "@express.ts/stereotype";
@Controller("/api")
export default class ApiController {
  /**
   * GET /api
   * List of API examples.
   */
  @GetMapping("")
  index (@Request() req: any,
         @Response() res: any) {
    res.render("api/index", {
      title: "API Examples"
    });
  }
}