# RouteService Service

import { RouteService } from "@tsed/common"

# Overview

class RouteService {
    constructor(platform: Platform);
    get routes(): IRouteController[];
    addRoutes(routes: IRoute[]): void;
    addRoute(endpoint: string, token: TokenProvider): Platform;
    getRoutes(): IRouteDetails[];
    getAll(): IRouteDetails[];

# Description

RouteService is used to provide all routes collected by annotation @Controller.

# Members

get routes(): IRouteController[]

addRoutes(routes: IRoute[]): void

addRoute(endpoint: string, token: TokenProvider): Platform

Add a new route in the route registry

getRoutes(): IRouteDetails[]

Get all routes built by TsExpressDecorators and mounted on Express application.

getAll(): IRouteDetails[]