call is a simple node.js HTTP Router. It is used by popular hapi.js web framework. It implements predictable and easy to use routing. Even if it is designed to work with Hapi.js, you can still use it as an independent router in your app.
Example
const Call = require('call');// Create new routerconst router = new Call.Router();// Add routerouter.add({ method: 'get', path: '/' }, { label: 'root-path' });// Add another routerouter.add({ method: 'post', path: '/users' }, 'route specific data');// Add another route with dynamic pathrouter.add({ method: 'put', path: '/users/{userId}' }, () => { /* ...handler... */ });// Match routerouter.route('post',