A simple middleware-style router for isomorphic JavaScript web apps and single-page applications import Router from 'universal-router'; const router = new Router([ { path: '/one', action: () => 'Page One' }, { path: '/two', action: () => 'Page Two' } ]); router.resolve({ path: '/one' }).then(result => { document.body.innerHTML = result || 'Not found'; }); router.resolve({ path, ...context }) → Pro
![Universal Router](https://cdn-ak-scissors.b.st-hatena.com/image/square/5961b3576a211685b3e06298225717a2ec3225f4/height=288;version=1;width=512/https%3A%2F%2Fmedia.slid.es%2Fthumbnails%2F9939a7fe6cf4c37c8489c6c9eabc08c0%2Fthumb.jpg)