UNPKG

yahoi

Version:

Yet Another Highly Opinionated Isomorphic Framework

31 lines (22 loc) 767 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 './../lib/Router'; export default class DefaultTranslation extends Router { constructor(props) { // props. super(props); this.addRoute({ path: '/get', controller: 'DefaultTranslation', action: 'get' }); this.addRoute({ path: '/add', controller: 'DefaultTranslation', action: 'add', type: 'POST' }); // this.addRoute({ path: '/:language/documentation/:version', router: 'Documentation' }); } }