mirror of
https://github.com/certd/certd.git
synced 2025-11-25 09:10:11 +08:00
16 lines
511 B
TypeScript
16 lines
511 B
TypeScript
import { Controller, Get, Inject, MidwayEnvironmentService, Provide } from '@midwayjs/core';
|
|
import { logger } from '@certd/basic';
|
|
import { Constants } from '@certd/lib-server';
|
|
|
|
@Provide()
|
|
@Controller('/home')
|
|
export class HomeController {
|
|
@Inject()
|
|
environmentService: MidwayEnvironmentService;
|
|
@Get('/', { summary: Constants.per.guest })
|
|
async home(): Promise<string> {
|
|
logger.info('当前环境:', this.environmentService.getCurrentEnvironment()); // prod
|
|
return 'Hello Midwayjs!';
|
|
}
|
|
}
|