import { IRouter } from "../../Common/Routing/Router" ; import { Request , Response } from "express" ; import { IPerson } from "../api/Models/People" ; import { PersonService } from "../api/Models/PersonService" ; export class SavePeopleRouting implements IRouter { AddRoute ( route ) { route . post ( '/add/' , ( request , response ) => { const person = < IPerson > { ... request . body } ; new PersonService ( ) . Save ( person ) ; response . json ( person ) ; } ) ; } }