Skip to content

express-ts/router

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

@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"
    });
  }

}