dota2-radiant
Version:
Radiant: a small little library/framework for building awesome apps backed by the Dota 2 WebAPI. Utilizes Node with Express
18 lines (13 loc) • 621 B
JavaScript
function require_controller(name, method) {
return require('../controllers/' + name)[method];
}
module.exports = exports = {
bind: function (server) {
server.get('/', require_controller('home', 'index'));
server.get('/heroes', require_controller('heroes', 'index'));
server.get('/rarities', require_controller('rarities', 'index'));
server.get('/matches', require_controller('matches', 'index'));
server.get('/matches/hero/:hero_id', require_controller('matches', 'index'));
server.get('/match/:match_id', require_controller('match-details', 'index'));
}
}