koa2-event-router

1.0.0 • Public • Published

koa2-router-event

Usage

const Koa = require('koa');
const eventRouter = require('../lib');

const app = new Koa();


app.use(eventRouter({
  path: `${__dirname}/src`,
  filename: /\.controller\.js$/,
}));

app.listen(9999);

Config

Name Type Require Default Description
path String true null scanning entrance
filename RegExp false /\.(js|ts)$/ controller file matching rule

Readme

Keywords

Package Sidebar

Install

npm i koa2-event-router

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

6.03 kB

Total Files

12

Last publish

Collaborators

  • songchengen