plugin-koa

0.0.1 • Public • Published

Micro APP Plugin Koa

[Plugin] koa adapter plugin for micro-app.

Micro APP 依赖 Koa 插件.

Coverage Status CircleCI NPM Version NPM Download

Install

yarn add @micro-app/plugin-koa

or

npm install -D @micro-app/plugin-koa

Usage

'use strict';


module.exports = function(app) {

    // 增强 $config
    app.$dispatcher('config', require.resolve('@micro-app/test/config'));
    // 配置全局 helper
    app.$dispatcher('helper', require.resolve('@micro-app/test/helper'));
    // 配置全局 service
    app.$dispatcher('service', require.resolve('@micro-app/test/service'));
    // 配置全局 plugin
    app.$dispatcher('plugin', require.resolve('@micro-app/test/plugin'));
    // 配置全局  middleware
    app.$dispatcher('middleware', require.resolve('@micro-app/test/middleware'));
    // 配置路由 router
    app.$dispatcher('router', require.resolve('@micro-app/test/router'));

    return app;

};

Package Sidebar

Install

npm i plugin-koa

Weekly Downloads

0

Version

0.0.1

License

MIT

Unpacked Size

30.2 kB

Total Files

26

Last publish

Collaborators

  • zyao89