/estrada

Lightweight isomorphic javascript router

Primary LanguageJavaScriptMIT LicenseMIT

Estrada

Build Status JavaScript Style Guide

Synopsis

Lightweight isomorphic javascript router

NPM

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