import Controller from "wms-core/Controller"; import {Request, Response} from "express"; export default class HomeController extends Controller { public routes(): void { this.get('/', this.getHome, 'home'); this.get('/about', this.getAbout, 'about'); this.get('/back', this.goBack, 'about'); } protected async getHome(req: Request, res: Response): Promise { res.render('home'); } protected async getAbout(req: Request, res: Response): Promise { res.render('about'); } /** * This is to test and assert that wms-core extended types are available */ protected async goBack(req: Request, res: Response): Promise { res.redirectBack(); } }