midway-test-component
midway 测试组件
Last updated 5 years ago by czy88840616 .
MIT · Original npm · Tarball · package.json
$ cnpm install midway-test-component 
SYNC missed versions from official npm registry.

midway 测试组件

包含路由,定时任务等。

使用方式

$ npm i midway-test-component --save

然后配置

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

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

效果

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

Current Tags

  • 1.0.4                                ...           latest (5 years ago)

5 Versions

  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (10)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |