koa-hornbill-vhost

1.0.1 • Public • Published

koa-hornbill-vhost

Install

$ npm install koa-hornbill-vhost --save

Usage

router(app, options)
  • app: {Object} koa instance.
  • options: {Object|String->root}
    • root: {String} router directory

Example

File tree

├── app.js
└── controller
    ├── deal
    │   ├── index.js
    │   └── refund.js
    ├── index.js
    └── test.js

app.js

var koa = require('koa');
var router = require('koa-hornbill-vhost');

app.use(router(app, {
  root: './example/controller'
}));

app.listen(3000);

Test

npm test

License

MIT

Package Sidebar

Install

npm i koa-hornbill-vhost

Weekly Downloads

3

Version

1.0.1

License

MIT

Last publish

Collaborators

  • xiongwilee