estrada
v0.2.0
Published
Router helper util
Downloads
5
Readme
Estrada
Synopsis
Lightweight isomorphic javascript router
API reference
match(url)
url
: required url string (for example '/alive')
Return route object or false.
How to use
Create instance Estrada.
const estrada = require('estrada');
const routes = [
{
route: '/alive',
meta: {foo: 'bar'}
},
'/user/:user',
'/user/:user/delete',
];
const router = estrada(routes);
router.match(url);
© Alexander Pokhodyun (Karbunkul) 2017