1.0.1 • Published 2 years ago

midway-test-inner-component v1.0.1

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

midway 包含组件依赖的测试组件

包含路由。

使用方式

$ npm i midway-test-inner-component --save

然后配置

import { Configuration, ILifeCycle } from '@midwayjs/core';
import * as test from 'midway-test-inner-component';

@Configuration({
  imports: [
    test
  ]
})
export class ContainerConfiguration implements ILifeCycle {
  async onReady(): Promise<void> {
  }
}

效果

  • 1、路由访问 /test/hello,会输出 {data: 'hello world', query: {}}
  • 2、控制台会输出定时任务的字符串