UNPKG

helena

Version:
20 lines (19 loc) 608 B
module.exports = function() { this.pluginId = 'router'; this.pathMapping = {}; this.get = function (path, callback) { this.pathMapping[path] = ['GET', callback]; }; this.put = function (path, callback) { this.pathMapping[path] = ['PUT', callback]; }; this.post = function (path, callback) { this.pathMapping[path] = ['POST', callback]; }; this.delete = function (path, callback) { this.pathMapping[path] = ['DELETE', callback]; }; this.all = function (path, callback) { this.pathMapping[path] = ['ALL', callback]; }; };