Skip to content
Vladimir Enchev edited this page Mar 18, 2016 · 3 revisions

This is how you can configure you routes

var RouteConfiguration = require('../../core/configuration/RouteConfiguration');
var Router = new RouteConfiguration();

/**
 * start
 */

/**
* If the request type is GET
* and the url path is "/"
* HomeController from app/controllers will be instantiated
* then index method in HomeController will be invoked
* then all dependencies from index method will be injected
*/
Router.get('/', 'HomeController@index');

/**
* Supported methods are
* - Router.get(path, controllerPattern)
* - Router.post(path, controllerPattern)
* - Router.put(path, controllerPattern)
* - Router.delete(path, controllerPattern)
*/

/**
 * end
 */
module.exports = Router;

pages

Clone this wiki locally