0.2.0 • Published 8 years ago

koa-66-aggregate v0.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

koa-66-aggregate

Node.js Version NPM version build status Dependency Status Coverage Status

Aggregate koa-66 Router from directories.

Installation

npm install koa-66-aggregate

Options

  • path : path of routes directories
  • useFiles: use all file as auto prefix (default: false)
  • autoPrefix: add dir/file as prefix (default: true)
  • plugins : object of plugins available on each router instance
  • globs : default : '**/index.js'

Example

routes/
	index.js
	v1/
		index.js

Each index.js exports an instance of koa-66

const aggregate = require('koa-66-aggregate');

const router = aggregate({path: './routes'});

It's use mount() methods of koa-66, prefixed by the name of the directory. So all routes contans on v1/index.js will be prefixed by /v1

0.2.0

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

9 years ago