UNPKG

typescript-express-mongoose-starter

Version:
20 lines (15 loc) 470 B
import { Router } from 'express'; import IndexController from '@controllers/index.controller'; import { Routes } from '@interfaces/routes.interface'; class IndexRoute implements Routes { public path = '/'; public router = Router(); public indexController = new IndexController(); constructor() { this.initializeRoutes(); } private initializeRoutes() { this.router.get(`${this.path}`, this.indexController.index); } } export default IndexRoute;