UNPKG

yahoi

Version:

Yet Another Highly Opinionated Isomorphic Framework

26 lines (20 loc) 586 B
/* * * Default Router * ################################################################### * * This router is mandatory and the default entry point for all routes * for your appliation * * Yahoi uses the following route-parser for 'path': * https://www.npmjs.com/package/route-parser * */ import { Router } from 'yahoi'; export default class DefaultRouter extends Router { constructor(props) { super(props); this.addRoute({ path: '/', controller: 'Index', action: 'Index' }); this.addRoute({ path: '/examples', router: 'Example' }); } }