2022-03-14 14:46:21 +08:00

19 lines
435 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Config, Get, Provide } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
/**
* 配置
*/
@Provide()
@CoolController()
export class DemoConfigController extends BaseController {
//获得模块配置,格式: module.模块名模块文件夹名称如demo
@Config('module.demo')
demoConfig;
@Get('/get')
async get() {
return this.ok(this.demoConfig);
}
}