0.4.0 • Published 10 years ago

baxel-route v0.4.0

Weekly downloads
-
License
MIT
Repository
-
Last release
10 years ago

Baxel Route

Routes for Baxel

Installation

npm install --save baxel-route

Usage

Prepare root routes

var route = require('baxel-route')
  // Returns a koa-router instance
  , router = route({
    // Root
    root: 'home#index',
    // namespace example
    example: {
      index: { get: 'example#index' },
      search: { get: 'example#search' },
    }
  });

Prepare subdomain routes, subdomain are used by baxel and its used with vhost

var route = require('baxel-route')
  // Returns a koa-router instance
  , router = route({
    subdomain: ['subdomain', 'subdomain-dev'],
    // Root
    root: 'subdomain#index',
  });

Limitations

Doesn't support nested namespaces ATM

License

MIT

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago