Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tiny route component for client and server
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.npmignore
README.md
component.json
index.js
package.json

README.md

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

Something went wrong with that request. Please try again.