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