Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    tower-routepublic

    Tower Route

    Tiny route component for client and server.

    Installation

    node.js:

    $ npm install tower-route

    browser:

    $ component install tower/route

    Example

    var route = require('tower-route');
     
    route('/welcome', function(context, next){
      context.render({ title: 'Hello World' });
    });

    Or with the action method:

    route('/welcome')
      .action(function(context, next){
        context.render({ title: 'Hello World' });
      });

    You can also name them (makes it so you don't have to mess with url strings in code, to redirect/transition/etc.:

    route('new-customer', '/welcome');

    License

    MIT

    Keywords

    none

    install

    npm i tower-route

    Downloadsweekly downloads

    7

    version

    0.1.0

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar