controller

This commit is contained in:
陶林 2022-06-01 15:40:31 +08:00
parent 0c5257d06d
commit a86d012adc
5 changed files with 3872 additions and 3915 deletions

View File

@ -77,4 +77,4 @@
"coverageDirectory": "../coverage",
"testEnvironment": "node"
}
}
}

View File

@ -9,11 +9,13 @@ import User from './entity/user';
import { TechModule } from './apps/tech';
import { CatsModule } from './apps/tech/cats/cats.module';
import { RateModule } from './apps/rate';
import { UseControllerModule } from './apps/useController';
@Module({
imports: [
TechModule,
RateModule,
RateLimiterModule,
UseControllerModule,
ScheduleModule.forRoot(),
TypeOrmModule.forRoot({
type: 'mysql',
@ -25,7 +27,7 @@ import { RateModule } from './apps/rate';
entities: [User],
synchronize: true, // 是否开启同步
autoLoadEntities: true, // 是否自动导入
logging: true, // 打印日志
logging: false, // 打印日志
}),
CatsModule,
],

View File

@ -0,0 +1,8 @@
import { Module } from '@nestjs/common';
import ParamController from './param';
@Module({
imports: [],
controllers: [ParamController],
providers: [],
})
export class UseControllerModule {}

View File

@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
@Controller('/useController/param')
@ApiTags('Controller使用')
export default class ParamController {
// 基本控制器
@Get('/t1')
getT1() {
return 'T1';
}
}

7761
yarn.lock

File diff suppressed because it is too large Load Diff